Giter Club home page Giter Club logo

got-lobstah's Introduction

got-lobstah

Project setup

  1. Fork, clone, and cd into the repo:
git clone https://github.com/shortdiv/got-lobstah.git
cd got-lobstah
  1. Install Netlify CLI:
npm i netlify-cli -g
  1. Unlink repo from existing Netlify site:
netlify unlink
  1. Create a new Netlify site:
netlify init

Select "Create & configure a new site" and follow the instructions in the terminal to finish creating your new Netlify site.

  1. Add FaunaDB:
netlify addons:create fauna
netlify addons:auth fauna 

The second command opens a browser window where you can login or sign up for a new Fauna account. Upon login, you will then see a modal asking if you want to import your database from Netlify and optionally rename it. Go ahead and rename it "got-lobstah", then click "Import"

  1. Add Netlify environment variables. Logged into your Netlify account, click on the site we just created, then click on "site settings", then under "Build and Deploy", go to "Environment variables". Add variables for the Yelp and Fauna API keys:

YELP_API_KEY

FAUNADB_SERVER_SECRET

In the next two steps, we will get the values for these two keys.

  1. To get the value for YELP_API_KEY, go to the Yelp developer's site and click on Yelp Fusion. This will take you to the Yelp Fusion page, where you will create your API key. Click on "Get Started", and "Create an App". In the create new app form, you will be prompted for information about your app. Once you do this, agree to Yelp API Terms of Use and Display Requirements. Then click the Submit button. Congratulations, you now have an API key. Paste the secret as the value for YELP_API_KEY that we created in the Netlify environment variables section in the last step.

  2. To get the value for FAUNADB_SERVER_SECRET, go to the FaunaDB Console, click on the database we created in step #7, then click on "Security" (in the left sidebar), then click "New key". Create a key and copy/paste the secret into the FAUNADB_SERVER_SECRET environment variable value we created in Step #8.

  3. In dashboard.fauna.com, click on "Collections" (in the left sidebar). Click "New collection" to create a new collection named "ratings"

  4. Now we are ready to install and run our app locally:

yarn install
netlify dev
  1. After it's running, go to localhost:8888. Try clicking on some stars to add a rating. You should see each rating saved as a new document in the "ratings" class in dashboard.fauna.com

Other commands

Compiles and hot-reloads for development

yarn run serve

Compiles and minifies for production

yarn run build

Run your tests

yarn run test

Lints and fixes files

yarn run lint

Customize configuration

See Configuration Reference.

got-lobstah's People

Contributors

n400 avatar shortdiv 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.