Created
May 21, 2016 22:00
-
-
Save JordiCorbilla/a44c7e5d4d433726f02f60d5102baebf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Example express application adding the parse-server module to expose Parse | |
// compatible API routes. | |
var express = require('express'); | |
var ParseServer = require('parse-server').ParseServer; | |
var path = require('path'); | |
var databaseUri = process.env.DATABASE_URI || process.env.MONGODB_URI; | |
if (!databaseUri) { | |
console.log('DATABASE_URI not specified, falling back to localhost.'); | |
} | |
var api = new ParseServer({ | |
databaseURI: databaseUri || 'mongodb://localhost:27017/dev', | |
cloud: process.env.CLOUD_CODE_MAIN || __dirname + '/cloud/main.js', | |
appId: process.env.APP_ID || 'thunderParse', | |
masterKey: process.env.MASTER_KEY || 'NzIxNTc2Mzk5NDI5MjE4DmNzNkZTA4ZGM3NzRlNg==', //Add your master key here. Keep it secret! | |
serverURL: process.env.SERVER_URL || 'http://localhost:1337/parse', // Don't forget to change to https if needed | |
liveQuery: { | |
classNames: ["Posts", "Comments"] // List of classes to support for query subscriptions | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment