0.1.0 • Published 5 years ago
anysols-security-service v0.1.0
Anysols Server Service
Anysols Server Service provides api for app server hosting
Starting core service
const AnysolsServerService = require('anysols-server-service');
const serverService = new AnysolsServerService({
"port": "8080"
}
);
serverService.start().then(() => {
console.log("Core service is up and running");
setTimeout(function () {
console.log("Stopping core service after 10 seconds");
serverService.stop().then(() => {
console.log("Core service shutdown successfully");
});
}, 10000);
}, function (err) {
console.log(err.message);
});
Defining schema and querying collection
serverService.get("/my-path", (req, res, next) => {
res.send("testing");
});
// open http://localhost:8080/my-path in browser