Skip to content
An express boilerplate module, because I don't want to copy my boilerplate around everywhere
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE
README.md
index.js
package-lock.json
package.json
test.js

README.md

Version License Author

Express Hotplate

An express boilerplate module, because I don't want to copy my boilerplate around everywhere

Installation

It's just a basic npm package, install it like any other npm package

npm i express-hotplate

Usage

Here's an example of a complete/typical options setup using all the available utilities. When an option is not included, the utility simply won't be used.

'use strict';
const path = require("path");
const {app, server} = require("express-hotplate")({
  morgan: {
    console: true,
    log: true
  },
  helmet: true,
  cookies: {},
  body: true,
  proxy: true,
  static: path.join(__dirname, "static"),
  session: {
    secret: ["this is a very secure cookie secret"],
    resave: false,
    saveUninitialized: true,
    cookie: {},
    url: "mongodb://localhost/test-session-store"
  },
  view: "pug",
  http: { port: 80 }
});

app.get("/", (req, res)=>{
  res.send("Hello");
});
You can’t perform that action at this time.