anysols-server-servicedeprecated

Anysols Server Service provides api for app server hosting

Usage no npm install needed!

<script type="module">
  import anysolsServerService from 'https://cdn.skypack.dev/anysols-server-service';
</script>

README

Anysols Server Service

Anysols Server Service provides api for app server hosting

Coverage Status

Starting core service

const AnysolsServerService = require('anysols-server-service');

const serverService = new AnysolsServerService({
    "port": "8080",
    "paths" : {
        views: __dirname + "/views",
        assets: __dirname + "/assets"
    },
    "pages": {
        "404": "404"
    }
}, null);

serverService.start().then(() => {
    console.log("Server service is up and running");
    setTimeout(function () {
        console.log("Stopping Server service after 10 seconds");
        serverService.stop().then(() => {
            console.log("Server 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

Code of Conduct

Contributor Covenant

License

Apache License 2.0