us-2020-gluesrv
v0.0.4
Published
Use this package to easily server u-service YSNSoftware Platform uServices
Downloads
4
Readme
us-2020-gluesrv
Use this package to easily server u-service YSNSoftware Platform uServices
Examples
const path = require('path');
const { uApp, uAppResponse, uAppResponseError, uServer } = require('us-2020-gluesrv');
async function startUservice(){
try {
let app = uApp;
// START: Adding router controllers and module services
// app.use(require(path.resolve(__dirname, 'controllers', 'default.js'))); // Please make your controller or routes folder <<----
// END: Adding router controllers and module services
app.use(uAppResponse);
app.use(uAppResponseError);
let userver = new uServer();
server = await userver.makeServer( 'TEST SERVER', 3100, app );
} catch (error) {
error.message += `. Location: test.js`;
console.log(error.message);
process.exit(1); // Auto restart with PM2
}
}
startUservice();
Coming soon
- Exhaustive documentation