Giter VIP home page Giter VIP logo

flask-react-postgres's Introduction

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 [email protected] 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.

flask-react-postgres's People

Contributors

cmuto09 avatar jeffreymew 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.