Giter Site home page Giter Site logo

paulcellsworth / hasura-course Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dmezhenskyi/hasura-course

0.0 0.0 0.0 427 KB

This is a project which we build in the Hasura course

JavaScript 2.13% TypeScript 88.15% HTML 5.69% SCSS 2.44% PLpgSQL 1.59%

hasura-course's Introduction

Hasura video course project

This is a project which we going to build during the video course about GraphQL engine Hasura

Instalation

Installation of the project happens step by step during the course but if you want to install and run the project immediately you need to perform next steps:

Clone it

Just clone this repository to you local machine git clone https://github.com/mezhik91/hasura-course-2020.git

Install neccessary tools:

Install Hasura CLI

Configure the Firebase project:

  • Install Firebase Tools npm install -g firebase-tools
  • Install npm dependencies: cd functions && npm install
  • Go You need to login with your firebase tools. Just run firebase login.
  • Create a project. Run: firebase projects:create --display-name hasura-course-project. You will be asked to give some id to the project. HINT! Use some unique prefix.
  • Copy Project ID of created project and replace all strings "hasura-course" in whole files with your project id. (but exclude files: package-lock.json, README.MD). HINT! You can use global search/replace in your IDE or CMD + Shift + f if you use VS CODE. (Should be affected files docker-compose.yaml, actions.yaml, remote_schemas.yaml, tables.yaml). P.s it is temporary solution, very soon it will be solved with env variables.
  • Set up project alias: firebase use --add and pick created project and give some aliase.
  • Run command: firebase open auth. Click "Get started" and activate "Email/Password" provider.
  • On Firebase console go to "Storage" and click "Get Started" and follow instructions.
  • In Code editor go to folder functions and clone and rename config.example.json to config.json and serviceAccountKey.example.json to serviceAccountKey.json;
  • Run firebase open settings copy WEB API KEY and paste in config.json instead "YOUR_API_KEY"
  • On this settings page go to "Service Accounts" tab and click "Generate new private key". Open generated file, copy its content and replace content of serviceAccountKey.json with what you just copied.
  • Go to the Storage page and copy your path to backet and in config.json replace value of "STORAGE_BACKET" with yours. HINT! It starts with: gs://. I explained where to find it in this lecture on Udemy or [this lecture on SkillShare] (https://www.skillshare.com/classes/Performant-GraphQL-Backend-just-in-few-evenings-with-Hasura-2020/26542982/projects) time code - 4:04

Run progect

Run Backend

  • Run cloud functions locally. In folder functions run npm run serve

  • Run docker containers. Open new terminal tab and in the project root folder execute:docker-compose up or docker-compose up -d if you want to run it as a daemon. (it may take up to 1-2 minutes)

  • Open Hasura Console. Once your containers are up and running you can open another terminal tab and navigate to hasura-server folder and open your Hasura console: cd hasura-server && hasura console

Frontend

  • Open a new terminal tab and go to the folder wich application (Angular so far) cd angular-hasura-app
  • Run npm install
  • Run npm run start
  • (Optional) if you plan to change .graphql files you should run npm run generate-types in separate terminal tab.

hasura-course's People

Contributors

dmezhenskyi 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.