-
Notifications
You must be signed in to change notification settings - Fork 1
/
app.js
29 lines (24 loc) · 790 Bytes
/
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
var express = require('express'),
app = express(),
sql = require('mssql'),
mongoose = require('mongoose');
bodyParser = require('body-parser');
var getData = require('./sqlip');
// nosql = require('./nosql');
// structure = require('./output');
app.use(bodyParser.urlencoded({extended : true}));
app.set('view engine','ejs');
app.use(express.static('public'));
app.get('/', (req, res) => {
res.render('home');
})
app.post('/', async (req, res) => {
// let structure = await getData.get_data(req,res);
getData.get_data(req, res);
// nosql.put_data(req, structure);
// console.log(structure);
// res.render('show', {data : strcutre})
})
app.listen(5000, () => {
console.log('Server initiated!!');
})