A command line wrapper for server connect and livereload
npm install --g connect-cli
Pxtorem CLI takes 3 arguments:
Argument | Alias | Default | Description |
---|---|---|---|
--host |
-h |
n/a |
the host eg:localhost,eg:www.xxx.com |
--port |
-p |
n/a |
the port eg:3000 |
cd you website folder
connect -h www.xxx.com -p 8888
all args is not a must.
cd you website folder
connect
it will use default options.
{ host:'localhost' ,port:3000 ,middleware:[] }
but you can create a "connect.json" file in the cwd folder to rewrite the options
the "connect.json" will be like:
{ host:'www.xxx.com' ,port:8080 ,"middleware":[{ "proxy":"/xxx/", "to":"http://192.168.1.100:8888/" },{ "proxy":"/xxxx/", "to":"http://192.168.1.101:8888/" }] }
if use a domain name as host,you must add a record in you host file in you system.
like:
127.0.0.1 www.xxx.com