This project uses React for frontend, NodeJS and ExpressJS for backend, and PostgreSQL for the database.
- Clone the repository
- Navigate to the project folder.
- Initialize and install the necessary modules.
npm install
- Navigate to the client directory and initialize and install the necessary modules (for frontend).
cd client && npm install
-
Run
cd ..
to go back to the root project folder. -
Create a
.env
file following the format:
DATABASE_URL=
To run the application, run npm run dev
.
To run the frontend only, run npm run dev:client
or npm start --prefix ./client
.
To run the backend only, run npm run dev:server
. Alternatively, you can use the following commands:
- To see live changes using nodemon, run
nodemon server.js
to see changes live - To run the current version only (restart required for any changes), run
node server.js
- client - contains files for the frontend
- src - contains files for the backend
- controllers - contains files which defines callback functions for client requests.
- models - contains files for database modeling and access.
- public - contains static assets such as css, js, and image files.
- routes - contains files which describes the response of the server for each HTTP method request to a specific path in the server.
- app.js - The main entry point of the web application.