Created
November 26, 2020 18:01
-
-
Save marcosdeaguiar/3a6f3b3f820390d2cd1c1c1c2da8e74e to your computer and use it in GitHub Desktop.
TypeORM wrong app start.
This file contains hidden or 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 * as express from "express"; | |
import ...; | |
import { createConnection } from "typeorm"; | |
const app = express(); | |
createConnection().then((connection) => { | |
app.use(...); | |
// Start other middleware and routes... | |
app.use(...); | |
}); | |
app.listen(3000, () => { | |
console.log("Server listening in port 3000."); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment