1.1.0 • Published 7 years ago

boilerpress v1.1.0

Weekly downloads
15
License
-
Repository
github
Last release
7 years ago

boilerpress

NodeJS Express Boilerplate

Usage

const { app, start } = require('boilerpress');
const os = require('os');

// Add any middleware you need
app.use((req, res, next) => {
  res.locals = {
    host: os.hostname(),
    title: 'Express',
  };
  next();
});

// Start the Express server
start();

Using a .env file

Create a .env file to use within the module.

These are the keys that you can configure.

NODE_ENV=development
PORT=3000
VIEWS_PATH=/usr/src/app/examples/default/express/views
VIEWS_ENGINE=pug
STATIC_FILES_PATH=/usr/src/app/examples/default/express/public
ROUTES_PATH=/usr/src/app/examples/default/express/routes
1.1.0

7 years ago

1.0.0

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago