https://github.com/poboisvert/flaskmarket
[React/Python] This project is a REST API using Python and Flask to store markets and a REACT interface. Redux uses V7+
https://github.com/poboisvert/flaskmarket
database python react
Last synced: 3 months ago
JSON representation
[React/Python] This project is a REST API using Python and Flask to store markets and a REACT interface. Redux uses V7+
- Host: GitHub
- URL: https://github.com/poboisvert/flaskmarket
- Owner: poboisvert
- Created: 2021-03-24T21:43:20.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-04-13T03:44:35.000Z (about 5 years ago)
- Last Synced: 2025-02-24T23:28:13.146Z (over 1 year ago)
- Topics: database, python, react
- Language: JavaScript
- Homepage: https://buttercms.com/static/images/tech_banners/Flask.png
- Size: 3.12 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Preview

### Overview
This project is a REST API using Python and Flask to store markets and a REACT interface.
- Python 2.7+ or 3.x
- Pytest
- Flask
- React
- Redux
- React-Router-Redux
### Create Database
```sh
$ python3 manage.py
```
### Install Front-End Requirements
```sh
$ cd static
$ npm install
```
### Run Back-End
If virtual env:
python3 -m venv env
source env/bin/activate
> source venv/bin/activate
```sh
$ python3 manage.py
```
#### Testing BackEnd
> python test.py
### Run Front-End
```sh
$ cd static
$ npm start
```
### Build Front-End
```sh
$ npm run build:production
```
### New to Python?
If you are approaching this demo as primarily a frontend dev with limited or no python experience, you may need to install dependencies!
You can check to see if you Python installed by doing:
```
$ python --version
$ pip --version
```
If pip is not installed, you can follow this simple article to [get both homebrew and python](https://howchoo.com/g/mze4ntbknjk/install-pip-on-mac-os-x)
After you install python, you can optionally also install python 3 with Anaconda (https://www.anaconda.com/)
```
$ brew install python3
```
Now you can check again to see if both python and pip are installed. Once pip is installed, you can download the required flask modules:
```
$ sudo pip install flask flask_script flask_migrate flask_bcrypt Flask-SQLAlchemy pytest flask_testing flask_restful flask_jwt requests jsonify
```
Now, you can decide on which database you wish to use.
4. Run Back-End
```
$ python3 manage.py
```
If all goes well, you should see `* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)` followed by a few more lines in the terminal.
5. open a new tab to the same directory and run the front end
```
$ cd static
$ npm install
$ npm start
```
6. open your browser and got to http://localhost:3000/register and setup your first account. Enjoy! By this point, you should be able to create an account and login without errors.