github

fbsamples / f8app

  • пятница, 15 апреля 2016 г. в 03:12:14
https://github.com/fbsamples/f8app

JavaScript
Source code of the official F8 app of 2016, powered by React Native and other Facebook open source projects.



F8 App 2016

This is the entire source code of the official F8 app of 2016, available on Google Play and the App Store.

How We Build It

We've created a series of tutorials at makeitopen.com that explain how we built the app, and that dive into how we used React Native, Redux, Relay, GraphQL, and more.

Requirements

  1. React Native (follow iOS and Android guides)
  2. CocoaPods 1.0+ (only for iOS)
  3. MongoDB (needed to run Parse Server locally)

Setup

  1. Clone the repo

    $ git clone https://github.com/fbsamples/f8app.git
    $ cd f8app
    
  2. Install dependencies (npm v3+):

    $ npm install
    $ (cd ios; pod install)        # only for iOS version
    
  3. Make sure MongoDB is running:

    $ lsof -iTCP:27017 -sTCP:LISTEN
    

    or if using external MongoDB server, set DATABASE_URI:

    $ export DATABASE_URI=mongodb://example-mongo-hosting.com:1337/my-awesome-database
    
  4. Start Parse/GraphQL servers:

    $ npm start
    
  5. Import sample data (the local Parse Server should be running):

    $ npm run import-data
    

    Make sure everything works by visiting:

  6. Running on Android:

    $ react-native run-android
    $ adb reverse tcp:8081 tcp:8081   # required to ensure the Android app can
    $ adb reverse tcp:8080 tcp:8080   # access the Packager and GraphQL server
    
  7. Running on iOS:

    $ react-native run-ios