Estimated Time Taken: 2-3 days
Please install Docker if you haven't already done so on your local machine. This is required in order to spin up a Docker container of the PostgreSQL server necessary to persist local data.
Next in order to create the docker container run this command in the root of the repo:
docker-compose up -d
Next, inside the apps/server
amend the .env.example
file name to be .env
. This env varaible is used to establish a connection between the server and the PostgreSQL DB.
These commands should all be peformed in the root of the monorepo!
Install dependencies:
npm install
Populate the DB locally by seeding your DB with some dummy user data:
npm run reset
Note
This command can be used to drop all tables and revert your DB to a clean state.
Next to serve the client side application coupled with the Nest.js server, simply run this script:
npm run dev
You can access the application locally via http://localhost:5173/
If you wish to explore the DB tables to view newly persisted user data after submitting into the form, you can do
so by running npx prisma studio
in src/apps/server
which should present a link to a GUI.
Alternatively you can also use a third party GUI to view the DB such as DBeaver
Here is a video of a working implementation: