Follow the instructions in this section to run the app locally.
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"
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"
cd api
yarn
cd client
yarn
yarn add react-router-dom
cd api
yarn dev
cd client
yarn dev
Visit http://localhost:5173
to see the app in action.