maitraysuthar / rest-api-nodejs-mongodb Goto Github PK
View Code? Open in Web Editor NEWA boilerplate for REST API Development with Node.js, Express, and MongoDB
License: MIT License
A boilerplate for REST API Development with Node.js, Express, and MongoDB
License: MIT License
Hi the APIs are not functional.
I setup the .env with mongoDB details and skipped SMTP. But anyhow the functionalities not dependent on SMTP were also breaking when I ran npm test
Please suggest.
i have successfully installed and started the server, and maybe i missed something somewhere, but how do i actually access the api? i load localhost:3000 and it shows the title and byline that should come up, but what do i add to the url to actually get json back?
There is no logout endpoint
This is my post request with body as application/json format from postman
`{"title": "test",
"date": "March 12 12 pm",
"status": "Ongoing",
"users": ["1","2"]
}`
But in nodejs when i try to retrieve req.body users am getting only 1 as output but not whole array.
2021-07-19T09_57_53_633Z-debug.log
I have checked package json file but bcrypt package already available
Error: Cannot find module 'bcrypt'
Require stack:
How about using RPC?
For example, I developed an RPC implementation for Node.js Wildcard API.
I'd be curious to know what you think about using RPC instead of REST.
if i want to call bookDetail api in bookStore, how should i do?
I guess adding the tests also a plus point in the provided structure?
Some packages are very old and some are depreciated. So for running the app there needs to update the packages. But there are some errors too. That are
^
Error: algorithms should be set```
and another one is:
```SetOptionError: useFindAndModify: "useFindAndModify" is not a valid option to set```.
Hello!
I'm new to mongo, and I really appreciate the help getting my API started.
I did an npm i, then set my mongo url, and started my mongo service, then ran npm test, but I'm having some "connection refused" errors. Do I have to manually create the databases in mongo?
Thanks
Hi,
I have enabled SMTP on GMAIL and trying to use this code but getting this error while using the following API
http://localhost:3000/api/auth/register
Error: Invalid login: 535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8 https://support.google.com/mail/?p=BadCredentials c4-c35345.73 - gsmtp
{
"status": 0,
"message": {
"code": "EAUTH",
"response": "535-5.7.8 Username and Password not accepted. Learn more at\n535 5.7.8 https://support.google.com/mail/?p=BadCredentials b29-c34543- gsmtp",
"responseCode": 535,
"command": "AUTH PLAIN"
}
}
EMAIL_SMTP_HOST=smtp.gmail.com
EMAIL_SMTP_PORT=465
EMAIL_SMTP_USERNAME=tried both email id and only account name
EMAIL_SMTP_PASSWORD=password goes here
# true for 465, false for other ports
EMAIL_SMTP_SECURE=true
Any idea on how to fix this.
I am sending form data but it didn't get it from server side,
Need to add docker support
We can refactor these if statements with Guard Clauses
rest-api-nodejs-mongodb/controllers/AuthController.js
Lines 114 to 160 in 8191ce9
I will add Kubernetes manifests so that it can be used in Kubernetes environment.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.