-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
26 lines (23 loc) · 839 Bytes
/
index.js
File metadata and controls
26 lines (23 loc) · 839 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
26
const express = require('express');
const session = require('./controller/session');
const app = express();
const calc = require('./controller/calc');
const checkPrime = require('./controller/PrimeNumber');
const magicNumber = require('./controller/MagicNumber');
const findMax = require('./controller/findMax');
app.use(express.json());
app.use(express.urlencoded({ extended: true }));
app.get('/', function (req, res) {
res.send('Hello World');
});
app.get('/login', session.login)
app.get('/forgetPassword', session.forgetPassword)
app.post('/signup', session.signup)
app.post('/add', calc.add)
app.post('/sub', calc.sub)
app.post('/prime', checkPrime.findPrime)
app.post('/magic', magicNumber.magicNumber)
app.post('/findMax', findMax.findMax)
app.listen(8080, function () {
console.log('Server is running on port 8080');
})