This is a simple user management application built with Node.js, Express.js, and EJS. The application allows users to perform CRUD (Create, Read, Update, Delete) operations on user data stored in a MongoDB database.
- Add a new user with a name, email, and profile picture.
- View all users.
- Edit user details.
- Delete a user.
Before you begin, ensure you have met the following requirements:
- Node.js and npm installed on your machine.
- MongoDB installed and running on your local machine or a MongoDB Atlas account.
-
Clone the repository:
git clone https://github.com/UMARSYED22/User Management App.git
-
Navigate to the project directory:
cd User Management App -
Install the dependencies:
npm install
-
Set up MongoDB: Ensure MongoDB is running on your local machine. If you are using MongoDB Atlas, update the connection string in the
user.jsmodel file.
-
Start the server:
node app.js
-
Open your web browser and go to
http://localhost:3000.
User Management App/
├── models/
│ └── user.js # Mongoose schema and model for User
├── public/ # Static files (CSS, JS, images)
├── views/
│ ├── index.ejs # Home page
│ ├── read.ejs # View all users
│ └── edit.ejs # Edit user page
├── app.js # Main application file
└── package.json # Project metadata and dependencies
GET / - Render the home page.
GET /read - Display all users.
POST /create - Create a new user.
GET /delete/:id - Delete a user by ID.
GET /edit/:userid - Render the edit user page.
POST /update/:userUpdateid - Update a user by ID.


