- update repo name from
package.json
- to deploy on heroku add this script into package.json
"heroku-postbuild": "npm run init:both && npm run build"
on the root add .env including this
# common
NODE_ENV = development
DEBUG = server
# server
SECRET = we-are-yalla
PORT = 8080
TOKEN_NAME = token
TOKEN_MAX_AGE = 2592000000
# database
DATABASE_URL = postgres://<user_name>:<password>@localhost:5432/<db_name>
DATABASE_URL_TEST = postgres://<user_name>:<password>@localhost:5432/<db_name>
- on Terminal run
psql
orpgcli
CREATE DATABASE <db_name>;
CREATE USER <user_name> WITH SUPERUSER PASSWORD '<password>'
GRANT ALL PRIVILEGES ON DATABASE <db_name> TO <user_name>
- update the DATABASE_URL in
.env
for the backend
- get
SENTRY_DNS
from sentry account (for express) - add it into .env file
- add it into the config
for the frontend
- get
SENTRY_DSN
from sentry account (for react app) - add it into
/client/.env
REACT_APP_SENTRY_DSN = <dns>