@qinfu/pp_web_server
v1.0.3
Published
Simple Web server module
Downloads
0
Readme
pp_web_server
Simple Web Server module. It could run https on localhost.
Install
npm install pp_web_server
Usage
import {simpleServer} from 'pp_web_server';
or
const simpleServer = require('pp_web_server');
const myServer = new simpleServer(["port number"],["doc root"],[https]);
myServer.run();
Default values
- port number = "8888"
- doc root = "./"
- https = false
you can override GET And POST function
myServer.getAct = (filePath) =>{
//do something
}
myServer.postAct = (postObject) =>{
//do something
};