loopback-component-server-admin

0.0.2 • Public • Published

loopback-component-server-admin

Adds server administrative tasks to a Loopback server

Setup

component-config.json

Add the following:

{
    ...
    "loopback-component-server-admin": {
        "mountPath": "/server"
    }
    ...
}

server.js

When you setup your server, you will need to capture the HTTP Server and save it in the app:

 // Bootstrap the application, configure models, datasources and middleware.
 // Sub-apps like REST API are mounted via boot scripts.
 boot(app, __dirname, function(err) {
 	if (err) {
 		throw err;
 	}

 	// start the server if `$ node server.js`
 	if (require.main === module) {
 		app.server = app.start();
 	}
 });

Package Sidebar

Install

npm i loopback-component-server-admin

Weekly Downloads

2

Version

0.0.2

License

MIT

Last publish

Collaborators

  • 6river-machine