10 Deploy - jp7io/typescript-crud-api GitHub Wiki

Deploy

Create new app

heroku create

Add Postgres

heroku addons:create heroku-postgresql:hobby-dev

Config

heroku config:set \
       APP_URL="https://`heroku domains | grep herokuapp.com`" \
       TYPEORM_DRIVER_EXTRA='{"ssl":{"rejectUnauthorized":false}}' \
       TYPEORM_ENTITIES='build/entity/*.js' \
       TYPEORM_SYNCHRONIZE=true \
       TYPEORM_URL=`heroku config:get DATABASE_URL`

Deploy

git push heroku main

Seed database

heroku run yarn seed

Open

heroku open