Create a Rest API to get users from a Database and display them. Using Vanilla nodejs for the backend and reactjs for the frontend and tailwindcss for styling.
Note
You can find the .env file in the repository. I know it's not ideal to have it here, but it's just for testing purposes.
- Go to the root directory, then open your terminal and run:
docker compose up -d - Now you can see the app in your localhost:
localhost:3000
Important
I assume that you have docker in your machine, and it's running.
-
run backend:
- First go to the backend directory: type
cd backendin your terminal from the root project directory. - Then run
npm install. - Run
npm start.
- First go to the backend directory: type
-
Run front end:
- First go to the frontend directory: type
cd frontendin your terminal from the root project directory. - Then run
npm install. - Run
npm start.
- First go to the frontend directory: type
-
Now you can see the app in your localhost
localhost:3000
- To run backend tests:
- Run
npm test
- Run
Warning
If you decide to use the second choice please run the backend first then frontend.