@akryum/flexsearch-es
Version:
Next-Generation full text search library with zero dependencies.
57 lines (46 loc) • 959 B
JavaScript
import ws from 'web-servo';
var port = process.argv[2];
if(!port){
if(/^win/.test(process.platform)){
port = 80;
}
else{
port = 8080;
}
}
ws.config({
"server": {
"port": port,
"dir": "/",
"exitOnError": false,
"ssl": {
"enabled": false,
"key": "",
"cert": ""
}
},
"page": {
"default": "index.html"
},
"methods": {
"allowed": [
"OPTIONS",
"GET",
"POST",
"HEAD",
"PUT",
"PATCH",
"DELETE"
//"COPY",
//"LINK",
//"UNLINK",
//"TRACE",
//"CONNECT"
]
}
});
//ws.setConfigVar('server.port', port);
ws.silent().start();
console.log("-----------------------------------------------------");
console.log("Hit CTRL-C to stop the server...");