Couple's Diary (CD) is a website where two people can share their daily experiences by writing about their days.
CD is build using express on the backend, and react on the frontend.
To make the handling of a monorepo easier, lerna is used.
npx lerna bootrap
Before starting the server, create a .env file in packages/server. An example .env file can be seen below
JWT_SECRET=anincrediblylongsecretthatitonlyusedonmymachine?!
DB_NAME=couplesdiary
HOSTNAME=localhost
SERVER_PORT=3333cd packages/server
npm run startcd packages/app
npm run startThe website should open automatically in your browser at http://localhost:3000
cd packages/server
npm run buildYou can then run the production server by executing npm run start:prod.
NOTE that the server does not serve the client files. Instead one should use other means to serve files. nginx is one good option.
cd packages/app
npm run buildcd packages/server
npm run test:watchcd packages/app
npm run test./scripts/test.shMIT