README
Cup
An easy way to run a web server in your system. you can indicate the public file path to run the server ,and look these html static files in browser.
中文文档
Features
- easy indicate directory and custom server port
- support indicate server public path
- support location parse. you can use location specify some special path.
- support api server proxy.
Install & Upgrade
npm install -g mini-cup
Usage
run default path
$ cup run //Default path is current root directory.
run indicated path
$ cup run <path> //The path is your indicated directory
run indicated path and server port
$ cup run <path> -p <port>
run by custom configration
you can write a configration file which name is config.cup.json
and located in you project root path. when you run the belows commands, this config file will be readed by cup, and the server will be run by your configration.
$ cup
or
$ cup config
config example
{
"name": "testcup",
"listen": 3001,
"root": "test/public",
"location": {
"*": "test/public/index.html"
},
"proxyTable": {
"/public": "www.google.com",
"/test": "www.google.com"
}
}
proxy config
More proxy config options
Github
License
MIT