forked from dmanjunath/node-redshift
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
28 lines (19 loc) · 818 Bytes
/
index.js
File metadata and controls
28 lines (19 loc) · 818 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
27
28
const express = require('express');
const bodyParser = require("body-parser");
const path = require('path');
module.exports = require('./lib/connection.js');
// module.exports.query = require('./lib/query.js');
// module.exports.model = require('./lib/model.js');
// module.exports.import = require('./lib/model.js').import;
var webapp = require('./examples/connection_pooling');
var app = express();
app.set('port', process.env.PORT || 4000);
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'ejs');
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));
app.use(express.static(path.join(__dirname, 'public')));
app.get('/getList', webapp.executeQuery);
app.listen(4000, function () {
console.log('Server is running.. on Port https://localhost:4000/');
});