Coder Social home page Coder Social logo

daverockz / cookbook-graphql-react-native Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cngroupdk/cookbook-graphql-react-native

0.0 1.0 0.0 708 KB

An example of application using Apollo GraphQL and React Native

JavaScript 77.70% Python 5.10% Java 4.16% Objective-C 13.04%

cookbook-graphql-react-native's Introduction

Receptar

This is example of graphQL Apollo Client technology and a little bit of React Native.

Installation

Note: Installation will cover steps only for iOS.

To run this project you have to install React Native

We recommend using yarn for this project, you can get yarn by running:

npm install --global yarn

This project also uses MongoDB. Before you run installation on iOS we recommend getting brew:

/usr/bin/ruby-e"$(curl-fsSLhttps://raw.githubusercontent.com/Homebrew/install/master/install)"

For Mac users run following:

brew update

brew install mongodb

Now you will need to create the data directory. By default, the mongod process uses the /data/db directory. Run this command to create the new directory:

mkdir -p /data/db

If you get following error:

mkdir: /data/db: Permission denied

just use the force:

sudo mkdir -p /data/db

Before starting the mongod process you need to add write permissions for the directory you just created, this can be achieved by following:

sudo chown -R $USER /data/db

After that open new tab in your terminal and run:

mongod

Running the application

The repository is divided into two parts:

  • server

  • client

To run the server you need to have running mongod process!!

To run the server:

From the root director:

cd server

yarn

After installation run:

yarn start

If everything went good you should see following:

GraphQL Server is now running on http://localhost:4000 Connected to DB

To run the client:

From the root directory:

cd client

yarn

After installation run following:

react-native start

this will start the react-native packager which is needed for running the app. Open new tab in your terminal, from root folder navigate to following:

cd client

and finally run

react-native run-ios

Enjoy!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.