Skip to content

Instantly share code, notes, and snippets.

@lrohde
Created August 13, 2019 19:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lrohde/2c882edac662c2eb8ea64e4d3b0c8de1 to your computer and use it in GitHub Desktop.
Save lrohde/2c882edac662c2eb8ea64e4d3b0c8de1 to your computer and use it in GitHub Desktop.
import express from 'express';
import routes from './routes';
class App {
constructor() {
this.server = express();
this.middlewares();
this.routes();
}
middlewares() {
this.server.use(express.json());
}
routes() {
this.server.use(routes);
}
}
export default new App().server;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment