generic parse server
TRANSCRIPT
Parse Server 101
David Olesch, 2016 1
Node.js is easy.Why not code the server yourself?
David Olesch, 2016 2
Features
David Olesch, 2016 3
How much does it cost to host Parse Server?
David Olesch, 2016 4
How long does it take to setup on the back end and front end?
David Olesch, 2016 5
Give me the codes
Generic Parse Server on Bitbucket
David Olesch, 2016 6
package.js{ "dependencies": { "express": "~4.11.x", "kerberos": "~0.0.x", "parse": "~1.8.0", "parse-server": "~2.2.13", }, "scripts": { "start": "node index.js" }}
David Olesch, 2016 7
index.js1 of 2
var express = require('express');var ParseServer = require('parse-server').ParseServer;
var api = new ParseServer({ databaseURI: process.env.DATABASE_URI || 'mongodb://localhost:27017/dev', cloud: __dirname + '/cloud/main.js', appId: process.env.APP_ID || 'AppId', serverURL: process.env.SERVER_URL || 'http://localhost:1337/parse']});var app = express();
David Olesch, 2016 8
index.js2 of 2
// Serve the Parse API on the /parse URL prefixvar mountPath = process.env.PARSE_MOUNT || '/parse';app.use(mountPath, api);
var port = process.env.PORT || 1337;var httpServer = require('http').createServer(app);httpServer.listen(port, function() { console.log('parse server running on port ' + port + '.');});
David Olesch, 2016 9
How do I run it on Heroku?git push heroku
David Olesch, 2016 10
How do I run it locally?npm start
David Olesch, 2016 11
How do I add the na,ve SDK to my iOS app?
David Olesch, 2016 12
Podfile
target 'MyParseApp' do pod 'Parse' pod 'ParseUI'end
David Olesch, 2016 13
AppDelegate.swi-func application(didFinishLaunchingWithOptions: launchOptions) -> Bool {
Parse.initialize(with: ParseClientConfiguration { $0.applicationId = 'AppId' $0.server = 'https://localhost:1337/parse' })
return true}
David Olesch, 2016 14