Developed as part of the Helsinki University Full-stack Open course. Currently there is no feature for creating an account via the frontend, you will have to manually do this via backend posting or i.e MongoDB Atlas. Frontend is pretty rough and was not really the main focus, but hey, I got to learn Tailwind a little bit. :D
Demo of the app is currently deployed live at Render.
- Clone the repository
- Create an .env file in the backend folder
Warning
Never push the .env file to your GitHub repository
-
Set up the following values in your .env file:
SECRET=your_secret_string PORT=your_chosen_port TEST_MONGO_DB_URI=your_test_database_url MONGO_DB_URI=your_main_database_url
Replace the placeholders with the following:
your_secret_string
: Any string value without special characters for your secret.your_chosen_port
: The port number you want your backend to run on.your_test_database_url
: URL for your test MongoDB database.your_main_database_url
: URL for your main MongoDB database.
-
Build dev environment with docker: docker compose -f docker-compose.dev.yml build
-
Start dev environment with docker: docker compose -f docker-compose.dev.yml up
-
docker-compose.yml runs the production app, but it is not ready for deployment yet. If you want to deploy with docker you will have to figure out how to setup the environmental variables.
There are ready made scripts for running the tests locally. The command is the same for both front- and backend.
npm run test
There are ready made scripts for running the style checks locally. The command is the same for both front- and backend.
npm run lint