kyou-static
0.0.4 • Public • Published 使用node搭建静态资源服务器
安装
npm install kyou-static -g
使用
kyou-static # 会在当前目录下启动一个静态资源服务器,默认端口为8080
kyou-static -p[port] 3000 # 会在当前目录下启动一个静态资源服务器,端口为3000
kyou-static -i[index] index.html # 设置文件夹在默认加载的文件
kyou-static -c[charset] UTF-8 # 设置文件默认加载的字符编码
kyou-static -cors # 开启文件跨域
kyou-static -h[https] # 开启https服务
kyou-static --openindex # 是否打开默认页面
kyou-static --no-openbrowser # 关闭自动打开浏览器
基本功能
- 启动静态资源服务器
- 端口可配置
- 字符编码可配置
- 文件夹下默认加载文件可配置
- 是否跨域可配置
- 开启https服务
TODO
- [x] 引入handlerbars编译模板
- [x] 支持文件是否跨域
- [x] 支持https服务
Package Sidebar
Install
Weekly Downloads