Skip to content

nivzelber/ts-graphql-typeorm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TS-GRAPHQL-TYPEORM

A full functioning graphql API with an orm, written with Typescript decorators.
This is my favorite stack when creating a new API due to it's ease of use is high readablity.
This repo is from a live coding session. A link to the session will be added later.

Running the code

Before running the code you need to change to configuration to match your db.
You can find the configuration under config/development.json.

Keep in mind that not all your configuration should be in this file. For further read see config and cross-env.

There is a production db up and running. Contact me for it's password.

Development

  • npm i
  • npm run dev

Open your browser under localhost:3001 and start hacking!

Production

  • npm i --only=prod
  • npm run build
  • npm run prod

localhost:8080

Live coding

If requested, I'll upload the session and put a link here.
The branches are ordered as in the session:

  • part-1: apollo-server only
  • part-2: adding typeorm
  • part-3: final touches and prod db (was not a part of the session)