- Node.js 20 or later (Prefer to use the latest LTS version)
- Node v22.10.0 is incompatible
- Node v20.19.0 is compatible
- if cleaning up and restarting
- Remove-Item -Recurse -Force node_modules
- Remove-Item -Force package-lock.json
- npm install
- npm audit fix --force
- A MongoDB server (You can use a free tier at MongoDB Atlas
In the case of MongoDB Atlas, it should be a string like this:
mongodb+srv://<username>:<password>@my-project-abc123.mongodb.net/test?retryWrites=true&w=majority
For more details, follow this MongoDB Guide on how to connect to MongoDB.
Copy the .env.local.example file in this directory to .env.local (which will be ignored by Git):
cd wildmile
cp .env.local.example .env.localThen set each variable on .env.local:
MONGODB_URIshould be the MongoDB connection string you got from step 1.
npm install
npm run dev
# or
yarn install
yarn devYour app should be up and running on http://localhost:3000! If it doesn't work, post on GitHub discussions.
Install Docker Desktop
Once the docker engine is running at the root folder run docker compose up -d. That will bring up the Mongo Database locally and seed it with the files in the repo and then create a container to run the nextJS application. You can access the website at localhost:8080
To run commands on the node app, like installing new packages or something similar you can exec into the container by doing docker compose exec web bash, which will create a terminal window for the container. Note that actions in the container are ephemeral and will not persist on rebuild.