@palante/palante-express
v1.0.8
Published
boot and config for palante ExpressJs apps.
Downloads
9
Readme
Palante Express
Standard Palante Express setup.
Installatiaon
npm i @palante/palante-express --save
Config
export default {
port: 8080,
database: 'mongodb://localhost:27017/myDatabase',
routes: [
{
path: '/user',
router: route
}
],
appVariables: {
myKey: 'myValue'
}
};
Bootstrapping
import config from './config';
import app from '@palante/palante-express';
app(config);
Error Handler
Uses an app level error handler to send back the error as a json payload.