Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rahulrajaram/the-ultimate-flask-front-end
The Ultimate Flask Front-End + fixes + deploy on AWS Lambda
https://github.com/rahulrajaram/the-ultimate-flask-front-end
api-gateway aws-lambda flask reactjs
Last synced: 23 days ago
JSON representation
The Ultimate Flask Front-End + fixes + deploy on AWS Lambda
- Host: GitHub
- URL: https://github.com/rahulrajaram/the-ultimate-flask-front-end
- Owner: rahulrajaram
- Created: 2019-08-12T04:19:42.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T06:56:20.000Z (about 2 years ago)
- Last Synced: 2024-05-27T12:24:48.679Z (7 months ago)
- Topics: api-gateway, aws-lambda, flask, reactjs
- Language: JavaScript
- Size: 1.01 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Overview
This repository is an extension to the excellent ["The Ultimate Flask Front-End"](https://realpython.com/the-ultimate-flask-front-end/#reader-comments), which is about several years old, and broken in a few places. This repository addresses those breakages. This repository also provides minimal instructions to deploy the app to AWS Lambda.
# 1. Setup
```sh
pip install -r requirements.txt
bower install
npm install
```# 2. Local testing:
To test locally, run the following commands in **two** different tabs, and visit http://localhost:5000:
```sh
gulp
``````sh
sh ./launch_server.sh
```# 3. Upload to AWS
1. Create a `build/` directory at the top level
2. Copy `project/app.py` into `build/`
3. Copy `project/static/scripts/js`, `project/static/css` and `project/templates` *recursively* into `build/`
4. Deploy **either** using:4.1. [`zappa`](https://github.com/Miserlou/Zappa#about) (read the instructions carefully and deploy to **exactly 1 region**). One thing to note is you don't explicitly need to create a Lambda handler; zappa will do it for you.:
```sh
zappa init
zappa deploy
```4.2. Alternately,
- create a Lambda handler function in `build/app.py`
- create a CloudFormation stack by packaging the `build/` directory and deploying it to a Lambda function.