Skip to content

Instantly share code, notes, and snippets.

@marcosdeaguiar
Created November 26, 2020 18:01
Show Gist options
  • Save marcosdeaguiar/3a6f3b3f820390d2cd1c1c1c2da8e74e to your computer and use it in GitHub Desktop.
Save marcosdeaguiar/3a6f3b3f820390d2cd1c1c1c2da8e74e to your computer and use it in GitHub Desktop.
TypeORM wrong app start.
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