https://github.com/argodevops/nodejs-restapi-mongo
A sample NodeJS API backed by MongoDB.
https://github.com/argodevops/nodejs-restapi-mongo
mongodb nodejs
Last synced: about 2 months ago
JSON representation
A sample NodeJS API backed by MongoDB.
- Host: GitHub
- URL: https://github.com/argodevops/nodejs-restapi-mongo
- Owner: argodevops
- Created: 2022-11-15T17:28:34.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-01-17T05:41:39.000Z (over 1 year ago)
- Last Synced: 2025-01-25T22:21:13.222Z (over 1 year ago)
- Topics: mongodb, nodejs
- Language: JavaScript
- Homepage:
- Size: 451 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Noddy Bookstore Rest API with mongo db.
A simple nodejs/mongo rest api; a book repo with faux user login.
There's no UI.
Created from a baseline nodejs/mongo restapi, in other words, nicked and then just expanded upon/altered/hacked about.
Runs in docker containers. 3 containers used:
Nodejs API
Mongo DB
Mongo express (arbitrary - just useful to use if altering db, can delete).
DB pre-populated by script.
May have to manually clear volume on taking down if want fresh db each time.
To control:
- docker-compose up
- docker-compose up -d (to run headless)
- docker-compose down
- docker-compose down -v (remove volumes).
If making code changes to the app, don't forget to build image before running docker-compose up.
- docker-compose build
Or change the docker-compose to use an image of the app, and manually docker build / tag etc first.
If wanting to run from command line without docker-compose, config to point at whatever mongo db or canned version of one you have, and npm install, npm run dev.