Git Product home page Git Product logo

cis469-flask-react_crud's Introduction

CRUD Application with Python-Flask and React as frontend

Deliverables

Deploy the application in CodeSpaces.

Part 1:

  1. Login to GitHub Account
  2. Fork the repository (You can clone and upload too)
  3. In the repository, create a new Codespaces Environment
  4. Run the application

Part 2:

  1. Use npm run build to make the dist folder. npm run build
  2. Checke the python code, with minor modification of the commented codes, and commening one line, you can run the dist version of react.
  3. Download the whole repo, and upload it in myCourses.

Structure of the application

  1. backend (app.py)
  2. database (mydatabase.db)
  3. frontend (_frontend/users)

Backend - You need a terminal to run the application

The back end of the application is based on Flask library. The steps to run the application are as follows:

  1. Initiate the virtual environment python3 -m venv env
  2. Activate the env in Windows run env\source\activate.bat in Mac OS: source env/bin/activate
  3. install the needed libraries pip install flask flask_cors
  4. run the application python app.py (note that python should be installed on your machine, or you can run it on a virtual environment/GitHub Codespaces)

Database

The database is based on SQLite. If the database does not exist, it will be created automatically. You just need to visit this endpoint to create the database: http127.0.0.1:5002/createDB

Frontend -You need a new terminal to run the application

The frontend is based on React library. The steps to run the application are as follows:

  1. cd _frontend/users/
  2. npm i
  3. npm run dev

cis469-flask-react_crud's People

Contributors

umassdgithub avatar

Watchers

 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.