Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Flask backend and React frontend

NotificationsYou must be signed in to change notification settings

taylorjg/flask-and-react

Repository files navigation

A little web app with the following features:

  • Backend is Python / Flask
  • Frontend is TypeScript / React
  • Deployment to Heroku as a Docker container via GitHub Actions
  • Display historical weather data in a visx chart

Running locally

In order to run locally, you first need to create a.env file:

FLASK_APP=server.pyOPEN_WEATHER_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Running locally in development mode

# Run the flask app to serve out the web apiflask run# Run the web development server to serve out the React app# Web api calls will be proxied to the flask app (due to the "proxy" setting in "package.json")npm run start# Open the web app in a web browseropen http://localhost:3000

Running the Docker image locally

# Build the Docker imagedocker build --tag flask-and-react .# Run the Docker image in a containerdocker run --rm --env-file .env --publish 5000:5000 --name flask-and-react --detach flask-and-react# Open the web app in a web browseropen http://localhost:5000# View the output logged by the flask app running in the Docker containerdocker logs flask-and-react# Stop the Docker containerdocker stop flask-and-react

Links

About

Flask backend and React frontend

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp