-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
33 lines (29 loc) · 1.36 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
30
31
32
33
var express = require('express');
var session = require('express-session');
var app = express();
// var mongoose = require('mongoose');
app.listen(8080);
console.log('Listening to port 8080')
app.set('view engine', 'ejs');
app.use('/css', express.static('./css'));
app.use('/Images', express.static('./Images'));
// var mongoose = require('mongoose');
app.use(session({secret: 'personname'}));
var catalogController = require('./controller/catalogController.js');
var profileController = require('./controller/profileController.js');
app.use('/',catalogController);
app.use('/profileController',profileController);
app.use('/categories',catalogController);
app.use('/about',catalogController);
app.use('/contact',catalogController);
app.use('/profileController/signin',profileController);
app.use('/categories/item/:itemCode',catalogController);
app.use('/profileController/myitems',profileController);
app.use('/profileController/save/:itemCode',profileController);
app.use('/profileController/deleteItem/:itemCode',profileController);
app.use('/profileController/feedback/:itemCode',catalogController);
app.use('/profileController/updateRating/:itemCode',profileController);
app.use('/profileController/signout',profileController);
// app.use('/profileController/signin',profileController);
app.use('/profileController/updateMadeit/:itemCode',profileController);
module.exports =app;