Skip to content

Commit

Permalink
adding-mock-data
Browse files Browse the repository at this point in the history
  • Loading branch information
benawad committed Aug 13, 2020
1 parent 81de2e8 commit 236a4df
Show file tree
Hide file tree
Showing 2 changed files with 310 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ import cors from "cors";
import { createConnection } from "typeorm";
import { Post } from "./entities/Post";
import { User } from "./entities/User";
import path from "path";

// rerun
const main = async () => {
const conn = await createConnection({
type: "postgres",
Expand All @@ -22,8 +24,10 @@ const main = async () => {
password: "postgres",
logging: true,
synchronize: true,
migrations: [path.join(__dirname, "./migrations/*")],
entities: [Post, User],
});
await conn.runMigrations();

const app = express();

Expand Down
Loading

0 comments on commit 236a4df

Please sign in to comment.