Giter VIP home page Giter VIP logo

react-fastapi-app's Introduction

Deployment

  1. To deploy the backend on your local machine do the following
  • cd into the api folder
  • create and activate virtual environment using python3.10 -m venv env && source env/bin/activate
  • install dependencies using pip install -r requirements.txt
  • start the app python main.py

Default environment values

These are some values that need to be provided before the app can run

Name Description Type Default Value
HNG_LESSON_DAY The day of the lesson assignment or practical String "day1"
HNG_API_ORIGINS The url of the frontend code for cors setting List 'http://localhost:3000'
HNG_API_HOST The host where you want to deploy the code String "localhost"
HNG_API_PORT The api port int 8000
  1. To deploy the frontend on your local machine do the following
  • cd into the fe folder
  • install the npm packages npm install
  • start the app npm run start

Default environment values

Name Description Type Default Value
REACT_APP_API_URL URL of the api endpoint String
REACT_APP_LESSON_DAY The day of the lesson assignment of practical String

The default port and host for the react app is 3000 and localhost respectively, these can be changed at runtime using the flags --port <port> and --host <host>

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.