A web application for managing student records using Express, EJS, MongoDB, and RESTful routes.
- Add new students
- View a list of students
- Edit student details
- Delete student records
- Filter students by major
- Form validation
- Flash messages for user feedback
- Clone the repository
- Install dependencies:
npm install
- Make sure MongoDB is running on your system
- Start the application:
npm start
- For development mode:
npm run dev
- Node.js
- Express.js
- MongoDB with Mongoose
- EJS (Embedded JavaScript Templates)
- Bootstrap 5
- Method-Override (for PUT and DELETE requests)
- Connect-Flash (for flash messages)
- Express-Session
app.js
- Main application filemodels/
- Database modelsroutes/
- Application routesviews/
- EJS templatespartials/
- Reusable template partsstudents/
- Student-specific views
Method | Path | Description |
---|---|---|
GET | /students | List all students |
GET | /students/new | New student form |
POST | /students | Create new student |
GET | /students/:id | Show student |
GET | /students/:id/edit | Edit student form |
PUT | /students/:id | Update student |
DELETE | /students/:id | Delete student |