A rest api made using flask.
To run this project you need to follow the instructions for the backend and frontend, and setup your database.
- Python3
- Postgres
First you need to clone this project
git clone git@github.com:lucasvieiramay/flask_app.git
Now entry on the project folder and type
cd backend
If you already have python3 instaled, create the virtual enviroment
virtualenv -p python3 venv
Install the requirements
pip install -r requirements.txt
Create your local_settings file, your can use vim or nano...
vim local_settings.py
Now paste this code into
POSTGRES = {
'user': 'postgres',
'pw': '123123',
'db': 'flask_db',
'host': 'localhost',
'port': '5432',
}
UPLOAD_FOLDER = '/uploads'
Create your database with the correct user and password (The same you put on your local settings file)
Fire up the database
python manage.py db init
Run Migrations
python manage.py db migrate
Run Upgrates
python manage.py db upgrade
And finally type
python app.py
app file
python -m unittest test_app
app service
python -m unittest persons.services.test_service
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
Run ng generate component component-name
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module
.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory. Use the -prod
flag for a production build.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via Protractor.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI README.
- Lucas May - Lucas May