A full-featured user management system built with Express.js and EJS templates, featuring server-side rendering for optimal performance and SEO benefits.
Clone the repository:
git clone <repository-url>
Navigate to the project directory:
cd register-form_Server-Side Rendering
Install dependencies:
npm install
The application includes a mock data solution for development without MongoDB. If you want to use MongoDB:
# Start MongoDB if installed
mongod
# Then modify moduls/user.js to use the MongoDB connection instead of mock data
Start the application:
node app.js
Open your browser and navigate to:
http://localhost:3000
register-form_Server-Side Rendering/
├── moduls/
│ └── user.js # User model (includes mock data solution)
├── public/ # Static assets
├── views/
│ ├── index.ejs # User registration form
│ ├── read.ejs # Display all users
│ ├── edit.ejs # Edit user form
│ ├── 404.ejs # Not found page
│ └── error.ejs # Error page
├── app.js # Main application file
├── package.json # Project dependencies
└── README.md # Project documentation
This project includes a mock data solution that allows you to run the application without MongoDB. The mock solution:
To switch to a real MongoDB database, modify the moduls/user.js
file to use a real MongoDB connection.
GET /
: Home page with registration formPOST /create
: Create a new userGET /read
: View all usersGET /delete/:id
: Delete a userGET /edit/:id
: Edit user formPOST /update/:id
: Update user informationThis project is licensed under the MIT License - see the LICENSE file for details.