-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
29 lines (26 loc) · 1.24 KB
/
app.js
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
26
27
28
29
const express= require('express');
require('./models/index'); // index file is required
const usercontroller=require('./controller/userController'); // userController file is required
const app=express();
app.get('/',(req,res)=>{
res.send("HAOME PAGE");
}
)
app.get('/add',usercontroller.addUser); //route to usercontroller calls addUser function when add route is called
app.get('/crud',usercontroller.crudoperation);//route to crud function
app.get('/query',usercontroller.query);//route to query
app.get('/finder',usercontroller.finder);
app.get('/validation',usercontroller.validation);
app.get('/rawquery',usercontroller.rawquery);
app.get('/onetoone',usercontroller.oneToOne);
app.get('/addpost',usercontroller.addpost);
app.get('/belongto',usercontroller.belongto);
app.get('/hasmany',usercontroller.hasmany);
app.get('/manytomany',usercontroller.manytomany);
app.get('/scope',usercontroller.scope);
app.get('/polymorphic',usercontroller.polymorphic);
app.get('/manytomanypolymorphic',usercontroller.manytomanypolymorphic);
app.post('/adduser',usercontroller.addUser);
app.get('/find',usercontroller.find);
app.get('/delete',usercontroller.finddelete);
app.listen(2999,()=>console.log("app is listenening local host"));