node-http-server
Version:
A very simple and fast http server for node, bash, and spawnable from C, Python etc. It is lightweight and great for embedded solutions as well as everyday development or public facing apps.
22 lines (18 loc) • 515 B
JavaScript
//import the `node-http-server` module
//` const server=require(‘node-http-server’); `
const server=require('../../server/Server.js');
//set up a config with multiple domains on just http
const config={
verbose:true,
port:8000,
root:__dirname+'/appRoot/',
domain:'myapp',
domains:{
'a.myapp':__dirname+'/appSubDomainRoot/',
'yourapp.com':__dirname+'/appOtherDomainRoot/'
}
}
//examine the server instance
console.log(server);
//start the server
server.deploy(config);