This is a clone of https://github.com/ECE444-2022Fall/Assignment_1_starter_template
This repository host the source code for Education Pathway project. You can view the online deployed version here. We are using this repo as a starting point for assignment 1.
This project was bootstrapped with Create React App for frontend, and Flask-tdd for backend.
Make you have all the prerequisites installed
- Git/GitHub Desktop
- Python (python-3.10.6)
- nodejs
$ git clone https://github.com/ECE444-2022Fall/Assignment_1_starter_template.git
First, to install the nodejs modules needed, run
$ npm install
then to start the app in development mode
$ npm start
$ npm run build
We use Heroku to deploy the project online. To do this, first sign up for a Heroku account, and then install the Heroku CLI.
Next, install a production-grade WSGI web server called Gunicorn:
$ pip install gunicorn==20.0.4
Create a Procfile in the project root:
$ touch Procfile
And add the following code:
web: gunicorn project.app:app
Create a requirements.txt file to specify the external dependencies that need to be installed for the app to work:
$ touch requirements.txt
Add the requirements:
Flask==2.1.1
gunicorn==20.0.4
pytest==7.1.2
Create a .gitignore file in the project root:
$ touch .gitignore
And include the following files and folders (so they are not included in version control):
env
*.pyc
*.DS_Store
__pycache__
test.db
To specify the correct Python runtime, add a new file to the project root called runtime.txt:
python-3.10.4
Add a local Git repo:
$ git init
$ git add -A
$ git commit -m "initial"
Deploy to Heroku:
$ heroku create myapp-unique-name
$ git push heroku main
Then to view the deployed app online, run
$ heroku open
or go to your Heroku account and check your the url of your deployed app. (https://myapp-unique-name.herokuapp.com/
)