MVC Architectural Pattern built with express, mongo and ejs as a template engine.
The Model-View-Controller (MVC) is an architectural pattern that separates an application into three main logical components: the model, the view, and the controller. Each of these components are built to handle specific development aspects of an application. MVC is one of the most frequently used industry-standard web development framework to create scalable and extensible projects.
Firstly, clone this repository to your local machine.
git clone https://github.com/notwld/express-mvc
Install all the dependencies using,
npm i
Create an .env file and define database's URI and application's Port.
URI=(your connection string)
PORT=3000
Finally run your application using,
npm start
GET /
POST /save
Parameter | Type | Description |
---|---|---|
v_type |
string |
Required. Vehicle Type |
description |
string |
Required. Vehicle Description |
model |
string |
Required. Vehicle Model |
engine |
string |
Required. Vehicle Engine |
color |
string |
Required. Vehicle Color |
POST /update/:id
Parameter | Type | Description |
---|---|---|
id |
string |
Required. Vehicle Id |
edit_v_type |
string |
Required. Vehicle Type |
edit_description |
string |
Required. Vehicle Description |
edit_model |
string |
Required. Vehicle Model |
edit_engine |
string |
Required. Vehicle Engine |
edit_color |
string |
Required. Vehicle Color |
DELETE /delete/:id
Parameter | Type | Description |
---|---|---|
id |
string |
Required. Vehicle Id |
GET /vehicle/:id
Parameter | Type | Description |
---|---|---|
id |
string |
Required. Vehicle Id |