9 |
10 |

11 |
Welcome to React
12 |
13 |
14 | To get started, edit src/App.js and save to reload.
15 |
16 |
17 | );
18 | }
19 | }
20 |
21 | export default App;
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # react-flask-heroku
2 | Simple bootstrapping code to get you started with a React frontend and Flask backend ready to deploy to Heroku.
3 |
4 | ## Dependencies
5 |
6 | python3, npm, Heroku CLI
7 |
8 | ## Setup
9 |
10 | 1. `pip3 install -r requirements.txt`
11 | 2. `npm install`
12 |
13 | ## Running Locally
14 |
15 | 1. `npm run build`
16 | 2. `heroku local`
17 |
18 | The application will be running at http://localhost:5000.
19 |
20 | ## Deploying
21 |
22 | First, create your app on Heroku. Then:
23 |
24 | 1. `heroku git:remote -a {YOUR_APP_NAME}`
25 | 2. `heroku buildpacks:set heroku/python`
26 | 3. `heroku buildpacks:add --index 1 heroku/nodejs`
27 | 4. `git push heroku master`
28 |
29 | ## Project Structure
30 |
31 | * Flask server is at `app.py`
32 | * React components in `src/`
33 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 Neel Somani
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |