This is a simple boilerplate with React as frontend, Express & Node as backend and Mongodb as database with Redis in between. The whole project is using Typescript, Vite and Vitest as test framework.
Use the package manager npm to install all the dependencies for both backend and frontend by running the command from the root folder.
TIP: when you're in root folder and running this cmd, the cmd will run for both frontend and backend.
npm install
TIP: when you're in root folder and running this cmd, the cmd will run for both frontend and backend.
npm run dev
Build, compile and previews the compilated app.
TIP: when you're in root folder and running this cmd, the cmd will run for both frontend and backend.
npm run preview
npm run test
There's also a ui for the tests.
npm run test-ui
The build is going to delete any existing dist folder and then compile new files in a new dist folder.
TIP: when you're in root folder and running this cmd, the cmd will run for both frontend and backend.
npm run build
When deploying to docker, it will simulate a production environment and deploy the compiled files in the dist folders to make the app as small as possible.
docker compose up -d
Remember to undeploy before building the new image.
docker compose build
docker compose down