-
Notifications
You must be signed in to change notification settings - Fork 0
/
express.js
44 lines (40 loc) · 873 Bytes
/
express.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
34
35
36
37
38
39
40
41
42
43
44
const express = require('express')
const port = 8900
// sourced from, https://mongodb.github.io/node-mongodb-native/driver-articles/mongoclient.html
let pg = require('pg');
let app = express();
let { postgresRoutes } = require('./routes/postgres.js');
let { mongoRoutes } = require('./routes/mongo.js');
app.listen(port);
console.log('app listening on port ' + port)
app.get('/', function(req,res){
res.redirect('/mongo/check')
})
app.use('/mongo', mongoRoutes);
app.use('/postgres', postgresRoutes);
// currently implemented:
// mongo/check
// mongo/insert
// mongo/delete
//
// postgres/insert
// postgres/create
// postgres/alter
// postgres/drop
//
// not currently implemented:
//
// mongo/create
// mongo/alter
// mongo/drop
//
// postgres/delete
// postgres/check
//
// expectation for a database?
// /check
// /create
// /insert
// /delete
// /alter
// /drop