View Code? Open in Web Editor
NEW
Node.js Web API example using Hapijs and MongoDB
nodejs-with-mongodb-api-example's Introduction
Node.js with MongoDB Example
![Swagger Page of that application Swagger Page of that application](https://camo.githubusercontent.com/eb110ed968898b5772954ff53c38f9a2d85e613e9622e60393c3d03393b6e26d/68747470733a2f2f692e696d6775722e636f6d2f56366b395156422e706e67)
- Node.js v10+
- MongoDB running on local instance
- PORT: 3000
- MONGO_URL: localhost:27017
- Install dependencies -
npm i
- Build typescript -
npm run build
- Run project -
npm start
- Go to swagger page -
localhost:3000/
Development with Watch Compiler
- Run once -
npm run dev
- Run and watch files -
npm run dev:watch
nodejs-with-mongodb-api-example's People
Contributors
nodejs-with-mongodb-api-example's Issues
Hi,
I ran across this project while learning docker. I am using node14 and npm run build
throws error:
npm ERR! errno 1
npm ERR! nodejs-with-mongodb-api-example@1.0.0 build: `npx typescript`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nodejs-with-mongodb-api-example@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
I think package.json needs to be changed. build script needs to be:
Please reply if you find this relevant.
Thanks