This is an assignment where I'm demonstrating my knowledge within the JS echo system.
The is a mono repo using pnpm as package manager, and has a backend app in node and a frontend app that's using React.
- Buildtool: Vite
- Dependencies:
- Axios: Request
- Just a demonstration of how to share types between frontend and backend
- Make sure you got pnpm installed by checking your version with the command
pnpm -v
. If it's not installed run the by runningbrew install pnpm
on Mac. Installation for Windows user - Run
pnpm i
to install dependencies for the project
- Go to
/apps/backend
and copy theexemple.env
to.env
and replace the value forAPI_KEY
an API key from [https://api-ninjas.com/profile](this service for random words). Also add a minimum 32 character string forSESSION_KEY
. - Run
pnpm dev
to start frontend and backend app. - Visit
http://localhost:1337
From the root of the project:
- Run
pnpm run build
to build frontend and backend app. - Run
pnpm run start
to start frontend and backend app. - Visit
http://localhost:8080
. (Backend is available onhttp://localhost:3000
)
Run pnpm run prune:stack
which will remove the data from the backends json DB.