Skip to content

ksdemo/cup

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

简易命令行express服务容器

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 88.9%
  • HTML 10.2%
  • Shell 0.9%