Coder Social home page Coder Social logo

bridg-expo-2's Introduction

Bridg - React Native Starter

This example uses Netlify cloud functions as the execution environment for running DB queries. (We need a secure place for Bridg to talk to the DB)

There is nothing special about Netlify here. This would work on any cloud provider / deployed JavaScript evironment. Some other potential options:

  • AWS Lambda
  • Firebase Functions
  • Express app deployed on Render, Heroku, wherever
  • Next.js API route

(You probably get the idea)

Push your schema to your DB:

  1. Add a DB connection string to .env
    • You can add .env to your .gitignore now, or rename it .env.local
  2. npm run prisma:push

Configuring Bridg with Netlify:

  1. Clone/fork this repository and push it to Github as a new project
  2. Create a Netlify account if you don't have one yet: https://netlify.com
  3. Install Netlify CLI: npm install netlify-cli -g
  4. Create a Netlify project: ntl init
    • Choose "Create & configure a new site"
    • Press return through all options
    • The CLI should create this new project linked to your Github repo, if you open the Netlify web app, you should see your new app, and a deploy in progress
  5. On Netlify, go to: Site configuration > Environment variables > Add a variable
    • Add DATABASE_URL for "key" and your connection string for "values"
  6. Go to: Deploys > "Trigger Deploy" dropdown > Clear cache & deploy site
  7. npm run generate

Your mobile app should now be able to run queries via Bridg running on your Netlify cloud function.

Running the app

  1. npm install
  2. npm run ios or npm run android

bridg-expo-2's People

Contributors

joeroddy avatar

Stargazers

 avatar

Watchers

 avatar

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.