Skip to content

jeffreymew/Flask-React-Postgres

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flask + React + Postgres Starter

This is a minimal sample Flask and React starter code that demonstrates how both frameworks can be used together in a single page web Application.

The code is based on https://github.com/dternyak/React-Redux-Flask.

Tutorial

1. Setting Up The Project

  1. Clone the reponsitory
git clone [TODO INSERT URL]
cd flask-react-postgres
  1. Install requirements.txt
pip install -r requirements.txt
  1. Import the project folder into VS Code
code .

2. Running The Code Locally

  1. Build the react.js front-end.
npm install
npm run build
  1. Create the PostgreSQL database
python manage.py create_db
  1. Start the Flask server
python manage.py runserver
  1. Check localhost:5000 in your browser to view the web application.

3. Deploying The Code To Azure

  1. Go to the extensions tab on VS Code

  2. Install the recommended extensions that show up

  3. Access Azure through (1) Guest Mode, (2) Creating a free Azure account or (3) signing into Azure with an existing account

  4. Create an App Service instance

  5. Create a PostgreSQL database with Azure Database for Postgres and connect it to the App Service instance

  6. Deploy the code to your newly created App Service instance

Contributing

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Feedback

Bundled Extensions

The code ships with a set of recommended Visual Studio Code extensions that will empower the developement process of your Flask + React web application. These extensions include rich language support (code completion, go to definition) for both Python and JavaScript, as well as quick deploy to Azure from within VS Code. When the project is imported into VS Code, a notifcation will appear giving you the option to install these extensions.

List of bundled extensions:

License

Copyright (c) Microsoft Corporation. All rights reserved.

Licensed under the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published