Thursday, January 17, 2019

http-server


https://github.com/indexzero/http-server

linux


putty:

// first switch to root user
sudo su

// install
npm install http-server -g




cd /home/hoogw/fileRestAPI

// windows run
http-server ./fileRestAPI


//linux run with pm2
// by default [path] is ./   [port] is 8080
// so far only 8080 works on centos, server,
// but localhost, any port will work.
pm2 start http-server

No comments: