gilmoreg-nodesvc
v0.1.8
Published
Node starter
Downloads
14
Readme
nodesvc
Usage
const express = require('express');
const { init, start, stop } = require('../');
const swagger = require('./swagger.json');
init({
router, // optional, default null - routes will be appended with /api
rootRouter, // optional, default null - routes will install directly on /
swagger, // optional, default {}
middleware: [], // optional, default []
url: 'localhost', // optional, default 'localhost'
port: 3000, // optional, default 3000
corsOptions = { // optional, default as shown
origin: true,
credentials: true,
maxAge: 86400
}
});
const server = await start(app);Please see /samples for example usage.
