Skip to content

Node User CRUD project with Mongoose. Featuring user authentication. Backend only.

Notifications You must be signed in to change notification settings

katson1/node-mongodb-crud

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NodeJS User CRUD with MongoDB

Basic user CRUD using NodeJS and mongodb.

Using ES module

This is a basic CRUD application built with Node.js and MongoDB. It features user authentication using JWT, with passwords hashed using MD5 encryption. The application provides CRUD operations for user management, serving as a foundational tool for various needs. It's a straightforward starting point for projects requiring user authentication and basic data management.
How start development:

Requirements:

Clone the project.

Install required packages into the project. In the project folder, use the following command in the terminal:

npm start

Copy the .env.example to .env:

cp .env.example .env

Run this command in a other terminal to start mongodb:

mongod
Click here if you're having problems with the command "mongod" (on Windows)
Reinstall MongoDB as usual and wait until Compass appears. If it doesn't, uninstall and reinstall. 
Copy the installation path; we'll need it.
Open a command prompt (cmd.exe) as an administrator.
Type: cd C:\
Then: md "\data\db"
After that: "C:\Program Files\MongoDB\Server\4.2\bin\mongod.exe" --dbpath="c:\data\db"
Press "CTRL+C" and close cmd.exe.
Copy the installation path up to the "bin" folder, for example: C:\Program Files\MongoDB\Server\YOUR_MONGODB_VERSION\bin
Go to system properties and add to the system environment variables (search on Google) in "PATH":
Double-click on PATH in "System Environment Variables".
Click on "New"
Paste the copied path and click OK.

Run the project:

npm start

Author: