DEV Community

Discussion on: Setup PostgreSQL with TypeORM in GraphQL Tutorial

Collapse
 
jimmymcbride profile image
Jimmy McBride

This is how I have my TypeORM set up that works exactly the way I wanted it:

createConnection({
    name: "default",
    type: "postgres",
    url: process.env.DATABASE_URL,
    synchronize: true,
    logging: true,
    entities: ["src/entity/*.*"],
    extra: {
      ssl: process.env.SSL || false,
    },
  });