mongoose: "^6.2.0"
Docker
node": "17.0.14"
docker-compose.yaml:
services:
entriesdb:
image: mongo:(version that you install locally in your computer)
container_name: entries-database
ports:
- 27017:27017
volumes:
- ./mongo:/data/db
To run locally, you need the database.
docker-compose up -d
- The -d, stands for detached.
Rename the .env.template file to .env.
- MongoDB Local URL:
MONGO_URL=mongodb://localhost:27017/entriesdb
- Rebuild node modules and start Next
yarn install
yarn dev
Will call:
http://localhost:3000/api/seed
Click mongo to go to Mongo docs. Click docker to go to docker documentation.