-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
26 lines (21 loc) · 733 Bytes
/
app.js
File metadata and controls
26 lines (21 loc) · 733 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
var express = require('express');
var ParseServer = require('parse-server').ParseServer;
var config = require('./config');
var path = require('path');
var api = new ParseServer({
databaseURI: config.config.database,
cloud: config.common_conf.cloudCode,
appId: config.common_conf.appId,
masterKey: config.common_conf.masterKey,
serverURL: config.config.serverURL,
oauth: config.config.oauth
});
var app = express();
app.use('/public', express.static(path.join(__dirname, '/public')));
app.use('/parse', api);
app.get('/', function(req, res) {
res.status(200).send('WOWRead API');
});
app.listen(config.config.port, function() {
console.log('parse-server-example running on port ' + config.config.port + '.');
});