This project is a monorepository using pnpm workspaces.
Install dependencies for both projects (api and website):
pnpm installCopy API TypeScript types to website:
pnpm copytypesSee each project's documentation:
Heroku is used to handle staging deployements:
-
Each pull request on
mainbranch will trigger a new deployment. The URL is available on the GitHub PR. -
The
mainbranch is deployed on https://date-poll-production-210a482abfed.herokuapp.com.
o2switch is used to handle production deployments:
- Connect with SSH to o2switch (
ssh <user_id>@seconde.o2switch.net). - Go to project folder and
git pullto get the latest code version. - Build
websiteand/orapiprojects withpnpm run build(⚠️ include environment variables for thewebsiteproject like:VARIABLE_1="VALUE_1" VARIABLE_2="VALUE_2" pnpm run build). - Restart
websiteand/orapiprojects on o2switch cPanel interface.
Cypress is used to run end-to-end (e2e) tests to reproduce users behaviour.
There are 2 ways to run these tests:
# Run tests in the command line
pnpm cypress:run
# Open the Cypress app
pnpm cypress:open