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.
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.
- npm i
- npm run dev
Open your browser under localhost:3001 and start hacking!
- npm i --only=prod
- npm run build
- npm run prod
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)