Set up a Typescript GraphQL API by running one command.
MIT License
npx create-graphql-api my-api
cd my-api
npm start
Basic: https://www.youtube.com/watch?v=WhzIjYQmWvs
Auth: https://www.youtube.com/watch?v=OVdPOExxKuU
You can do the following for an auth template:
npx create-graphql-api my-api --auth
Procfile
in the root folder of your project and put the following in it:web: node dist/index.js
package.json
add the following script to run the TypeScript compiler before Heroku runs your project:"heroku-postbuild": "tsc"
heroku create
heroku addons:create heroku-postgresql
git push heroku master
Note: You'll want to look at your ormconfig.js
and configure the options you want for production.
Also see this video on how you can deploy to Digital Ocean with Dokku: https://www.youtube.com/watch?v=AdHwBKKQHZ4