https://github.com/vagman/nodejs-course
42 hour Udemy course by Jonas Schmedtmann: Node.js, Express.js & MongoDB
https://github.com/vagman/nodejs-course
authentication backend-development mongodb nodejs restful-api
Last synced: about 2 months ago
JSON representation
42 hour Udemy course by Jonas Schmedtmann: Node.js, Express.js & MongoDB
- Host: GitHub
- URL: https://github.com/vagman/nodejs-course
- Owner: vagman
- Created: 2025-07-27T12:12:20.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-12-04T21:12:59.000Z (7 months ago)
- Last Synced: 2025-12-04T23:54:41.714Z (7 months ago)
- Topics: authentication, backend-development, mongodb, nodejs, restful-api
- Language: JavaScript
- Homepage:
- Size: 49.8 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Node.js, Express, MongoDB Course
### Deleting and reuploading DB data
1. Move to directory: ```cd .\dev-data\data```
2. Delete MongoDB data: ```node import-dev-data.js --delete```
3. Comment the following pre-save middleware in ```\models\userModel.js```:
```javascript
userSchema.pre('save', async function (next) {
if (!this.isModified('password')) return next();
this.password = await bcrypt.hash(this.password, 12);
this.passwordConfirm = undefined;
next();
});
```
5. Reuploading data: ```node import-dev-data.js --import```
6. Remove comments so encryption works normally again when signing up as a new user.
7. Check with MongoDB Compass just to make sure: Ctrl + R for a refresh.