This repository contains the final project for the "Web Programming" course held by Professor Andrea De Lorenzo @University of Trieste. The project consists in making a Twitter clone web app; the specs can be found here.
Inside each of the app and frontend folders, there is an .env file. These files have been deliberately added to git to allow the application to work without further configuration and to facilitate the reading of the code, avoiding having to create new ones.
In the .env file inside the app folder, there is a variable, called WITH_SAMPLE_DATA which, when starting the database, checks if set equal to true. In this case, if the database is empty, it will read the files contained in the app/db/mongo-seed folder and try to insert them. If this data is not desired, just set the variable to false in the .env file.
Move to app folder
cd app
Install all dependencies
npm install
Run docker command
docker compose up
This will create the necessary containers for the MongoDB database and for the Node.js server. If no changes have been made to the Docker related files and .env files, the application will be reachable at http://localhost:3000.
Start the server
docker compose up
Move to frontend folder
cd ..
cd frontend
Install all dependencies
npm install
Start the dev server
npm run serve