- Docker and Docker Compose
Create a folder on your computer and clone the repository:
git clone https://github.com/RoutinelyOrganization/routinely-api.git
- Copy file .env.example from project root
- Rename it to .env
- Fill up the info:
# Replace the bracketed examples "[Database username]" with their final value "root"
PORT=[Server port]
# e.g: 3000
NODE_ENV=[Current application environment]
# e.g: development
SALT_SESSION=[Secret string for hashing session tokens]
# e.g: my_secret_string
SALT_DATA=[Secret string for hashing sensitive data]
# e.g: my_new_secret_string
SALT_ROUNDS=[Salt rounds for password hashing]
# e.g: 10
EMAIL_HOST=[Email host name]
# e.g: sandbox.smtp.mailtrap.io
EMAIL_PORT=[Email port]
# e.g: 2525
EMAIL_USERNAME=[Email user name]
# e.g: my_email_user_name
EMAIL_PASSWORD=[Email password]
# e.g: my_email_password
FROM_EMAIL=[Email adress]
# e.g: [email protected]
POSTGRES_USER=[Postgres user]
# e.g: root
POSTGRES_PASSWORD=[Postgres password]
# e.g: example
POSTGRES_DB=[Postgres database name]
# e.g: api-dev
POSTGRES_HOST=[Postgres host]
# e.g: localhost
POSTGRES_PORT=[Postgres port]
# e.g: 5432
DATABASE_URL="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}?schema=public"
# ! This value does not need to be changed, use it as is.
Recommended email service: Mailtrap
After cloning and whenever you synchronize the repository, run the command below to keep the dependencies up to date:
npm install
Development mode: This command runs all the commands needed for docker configuration
npm run dev
Development in minimal mode:
You must run normal mode at least once before using this mode
npm run dev:min
Production mode:
# build
npm run build
# start
npm run start:prod
unit tests:
npm run test
e2e tests:
npm run test:e2e
Author - Routinely's backend team
Routinely API is MIT licensed.