a mini server container.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
test
.gitignore
README.md
README_zh.md
app.js
cup.config.js
package.json
run.sh

README.md

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

  1. easy indicate directory and custom server port
  2. support indicate server public path
  3. support location parse. you can use location specify some special path.
  4. 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 -c
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

https://github.com/wewoor/cup

License

MIT