/MedAPP

Primary LanguageJavaScript

Run the app

Follow the instructions in this section to run the app locally.

1. setup api .env

Start by copying the .env.example file to .env.

cd api
cp .env.example .env

Then, fill in the MONGO_URL field in .env with your MongoDB connection string and fill in the PORT field with the port you want to use. After that, you're .env file should look like this. If you don't want to use MongoDB Atlas, you can also run a local MongoDB server with Docker. You can find the instructions here.

MONGO_URL="mongodb+srv://<username>:<password>@<cluster>.example.mongodb.net/?retryWrites=true&w=majority"

2. setup client .env

Start by copying the .env.example file to .env.

cd client
cp .env.example .env

Then, fill in the VITE_API_URL field in .env with the url of your backend server. After that, you're .env file should look like this. Note that the port should be the same as the one you set in the backend .env file.

VITE_API_URL="http://localhost:4000/api"

3. Install dependencies

cd api
yarn 
cd client
yarn 
yarn add react-router-dom

4. start the backend server

cd api
yarn dev

5. start the frontend server

cd client
yarn dev

Visit http://localhost:5173 to see the app in action.