-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
server.js
29 lines (23 loc) · 776 Bytes
/
server.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');
const app=express();
const bodyParser=require('body-parser');
const path=require('path');
const aws = require('aws-sdk');
const multers3 = require('multer-s3');
const multer = require('multer');
const routes={
newUser:require('./routes/newUser'),
userLogin:require('./routes/userLogin'),
admin:require('./routes/admin')
}
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({extended:true}));
app.set('view engine','hbs');
app.set('views',path.join(__dirname,'views'));
app.use(express.static(path.join(__dirname,'public_static')));
app.use('/newUser',routes.newUser);
app.use('/userLogin',routes.userLogin);
app.use('/admin',routes.admin);
app.listen(2335,()=>{
console.log('Server on at http://localhost:2335/');
});