Created
August 13, 2019 19:55
-
-
Save lrohde/2c882edac662c2eb8ea64e4d3b0c8de1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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