Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

基于ES6 + node.js的静态服务器 #10

Open
chenshenhai opened this issue Jul 24, 2016 · 0 comments
Open

基于ES6 + node.js的静态服务器 #10

chenshenhai opened this issue Jul 24, 2016 · 0 comments
Labels

Comments

@chenshenhai
Copy link
Owner

chenshenhai commented Jul 24, 2016

基于ES6 + node.js的静态资源服务器

前言:

  • 平时开发简单页面时候,需要起apache或者nginx来作为静态资源的服务器,各种配置太麻烦了。-
  • 前端的开发还还是前端的方式去解决,用node.js写一个静态资源服务器,方便页面开发和配置,顺便尝试用一下ES6开发node.js服务应用。

内容

  • 主要是用于访问js,.css ,.html和图片等常见的静态资源文件。
  • 如果访问的url是文件目录,则会显示出文件目录。
  • 尝试了用ES6的import和export来封装node.js模块。
  • 但是node.js目前不支持import/export特性,需要通过babel进行编译才能运行。

源码仓库

https://github.com/ChenShenhai/node-server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant