-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhandler.js
More file actions
25 lines (17 loc) · 868 Bytes
/
Copy pathhandler.js
File metadata and controls
25 lines (17 loc) · 868 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import express from 'express' ;
import bodyParser from 'body-parser';
import controller from './Controller/controller.js';
import InsertValidate from './Middleware/validate.js';
import DataValidator from './Middleware/validate.js';
const app = express()
app.use(bodyParser.json())
app.use(bodyParser.urlencoded({extended:false}))
app.get('/',(req,res)=>res.send('its working.. Table Name id Emp_model'))
app.post('/Insert',DataValidator.InsertValidate,controller.Insert)
app.post('/Delete',DataValidator.Delete_validation,controller.Delete)
app.post('/FetchAll',controller.Scan)
app.post('/Update',DataValidator.Update_delete_validator,controller.Update)
app.post('/Fetch',DataValidator.FetchValidate,controller.Query)
app.post('/FetchWithGsi',DataValidator.GsiValidator,controller.Query)
// app.post('/Fetch',)
app.listen(3200,console.log('Running on 32000'))