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=3333
cd packages/server
npm run start
cd packages/app
npm run start
The website should open automatically in your browser at http://localhost:3000
cd packages/server
npm run build
You 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 build
cd packages/server
npm run test:watch
cd packages/app
npm run test
./scripts/test.sh
MIT