1.0.2 • Published 6 years ago

smallmoon v1.0.2

Weekly downloads
2
License
ISC
Repository
github
Last release
6 years ago

smallmoon

node静态资源服务器(低仿express)

安装

npm i smallmoon -g

使用

smallmoon # 把当前文件夹作为静态资源服务器根目录

smallmoon -p 8080 # 设置端口号为 8080

smallmoon -h localhost # 设置 host 为 localhost

smallmoon -d /usr # 设置根目录为 /usr

配置中间件

example: app.js文件

 app.use(function(req, res, next) {
   console.log('middleware 1')
   next()
 })
1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago