简体   繁体   English

用node.js编写的CDN服务器

[英]CDN server written in node.js

I am trying to find an example of a CDN server written in nodejs that does the following: 我试图找到一个用nodejs编写的CDN服务器的示例,该示例执行以下操作:

  • Minification of CSS & JS 缩小CSS和JS
  • Pre-Compiling LESS 预编译LESS
  • Pre-Compiling CoffeeScript 预编译CoffeeScript
  • Static Redirection if content already available in another bucket 如果另一个存储桶中已有内容,则进行静态重定向
  • A management interface 管理界面

I realize that something like this already exists (S3 etc) but my interest is academic. 我意识到这样的事情已经存在(S3等),但是我的兴趣是学术上的。 I am interested if something like this has been done in node, and how. 我对是否已在节点中执行了类似操作以及如何执行感兴趣。

You should have a look at express-cdn , a module to deliver compressed, minified and assets combined assets to CDN servers (Currently Amazon S3). 您应该看一下express-cdn ,这是一个将压缩的,缩小的和资产合并的资产交付到CDN服务器(当前为Amazon S3)的模块。 It lacks some management interface but implements a couple of features you require. 它缺少一些管理界面,但是实现了您需要的几个功能。

研究grunt ,它具有适用于各种资产管道的插件。

I cant find a module to perform all your tasks at the same time. 我找不到同时执行所有任务的模块。 You should mix modules in your application. 您应该在应用程序中混合使用模块。 I recommend you look at npmjs.org 我建议你看看npmjs.org

Minification of CSS & JS ---> Here CSS和JS的缩小---> 这里

Pre-Compiling LESS ---> Here 预编译LESS ---> 此处

Pre-compiling CoffeScript (The command-line version of coffee is available as a Node.js utility.) Here 预编译CoffeScript(咖啡的命令行版本可作为Node.js的工具。) 在这里

Static Redirection if content already available in another bucket: Nothing clear, you should have some kind of db for the files, for the redirections go to nginx.org <3 静态重定向(如果内容已在另一个存储桶中提供):尚不清楚,您应该为文件提供某种类型的数据库,因为重定向转到nginx.org <3

A management interface: Any Easy to extend Web-based File Manager for node.js? 管理界面: 对Node.js易于扩展的基于Web的文件管理器吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM