0.0.2 • Published 7 years ago

loopback-component-server-admin v0.0.2

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

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();
 	}
 });