Skip to content

Instantly share code, notes, and snippets.

View eriadam's full-sized avatar

Adam Eri eriadam

View GitHub Profile
import * as Config from 'config';
const expressConfig = Config.get('express') as ExpressConfig;
class Bootstrap {
constructor(app) {
let self = this;
// Taking the list from the the config file
let bootstrap = expressConfig.bootstrap;
for (var module of bootstrap) {
core: (app) => {
// Security
console.log(':: Helmet');
app.use(Helmet());
// Compression
console.log(':: Compression');
app.use(Compression());
// Proper error messages