Skip to content

davidnguyen11/typescript-graphql-postgres-boilerplate

 
 

Repository files navigation

Typescript & GraphQL & Postgres Boilerplate

Getting started

Make sure you have Docker installed

Database

To install the database management, run:

docker-compose up -d

To create database, run:

docker exec -it todo psql -U postgres -c "create database todo"

.env file

  1. Create the .env file
  2. Copy and parse the connection information below:
DB_USER=postgres
DB_HOST=localhost
DB_DATABASE=todo
DB_PORT=54320

Create tables

Open and run the database/sql/database.sql by postgres tools (i.e. pgAdmin)

Seeding data

dump data

To initialize the dump data for todo database, run:

npm run seed

Development

To run development environment

npm run dev

Production

To run production environment

npm start

References

About

Simple boilerplate integrated typescript, graphql, postgres and apollo server

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published