-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.js
More file actions
31 lines (27 loc) · 947 Bytes
/
server.js
File metadata and controls
31 lines (27 loc) · 947 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
29
30
31
var express = require('express');
var ParseDashboard = require('parse-dashboard');
var http = require('http');
var dashboard = new ParseDashboard({
apps: [
{
appId: process.env.APP_ID || 'myAppId',
masterKey: process.env.MASTER_KEY,
serverURL: process.env.SERVER_URL,
appName: process.env.APP_NAME,
},
],
users: [
{
user: process.env.USER_NAME,
pass: process.env.PASSWORD
}
]
}, true /* note: you have to set allowInsecureHTTP=true, HyperDev is still using HTTPS externally, but proxy to app container comms inside our network happen over http */);
var app = express();
// make the Parse Dashboard available at root /
app.use('/', dashboard);
var port = process.env.PORT || 3000;
var httpServer = http.createServer(app);
httpServer.listen(port, function () {
console.log('parse-dashboard running on port ' + port);
});