Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Generic Parse Server

152 views

Published on

Parse Server 101 is an intro to deploying open source Parse Server to an infrastructure that can run NodeJS. Developed for Jackrabbit Mobile.

Published in: Software
  • Be the first to comment

  • Be the first to like this

Generic Parse Server

  1. 1. Parse Server 101 David Olesch, 2016 1
  2. 2. Node.js is easy. Why not code the server yourself? David Olesch, 2016 2
  3. 3. Features David Olesch, 2016 3
  4. 4. How much does it cost to host Parse Server? David Olesch, 2016 4
  5. 5. How long does it take to setup on the back end and front end? David Olesch, 2016 5
  6. 6. Give me the codes Generic Parse Server on Bitbucket David Olesch, 2016 6
  7. 7. 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
  8. 8. index.js 1 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
  9. 9. index.js 2 of 2 // Serve the Parse API on the /parse URL prefix var 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
  10. 10. How do I run it on Heroku? git push heroku David Olesch, 2016 10
  11. 11. How do I run it locally? npm start David Olesch, 2016 11
  12. 12. How do I add the na,ve SDK to my iOS app? David Olesch, 2016 12
  13. 13. Podfile target 'MyParseApp' do pod 'Parse' pod 'ParseUI' end David Olesch, 2016 13
  14. 14. 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

×