Skip to content

hernanjkd/flask

Repository files navigation

Flask Boilerplate 4Geeks Academy

Open in Gitpod

How to stat the project?

There is an example API working with an example database. All your application code should be written inside the ./src/ folder.

  • src/main.py (it's were your endpoints should be coded)
  • src/mode.py (your database tables and serialization logic)
  • src/utils.py (some reusable classes and functions)

For a more detailed explanation look for the tutorial inside the docs folder.

Remember migrate every time you change your models

You have to migreate and upgrade the migrations for every update your make to your models:

$ pipenv run migrate (to make the migrations)
$ pipenv run upgrade  (to update your databse with the migrations)

Instalation for ubuntu

  1. Make sure you have python 3.6+
$ pipenv install (to install pip packages)
$ pipenv run migrate (to create the database)
$ pipenv run start (to start the flask webserver)

Deploy your website to heroku

This template is 100% compatible with heroku, just make sure to understand and execute the following steps

  1. Install heroku
$ npm i heroku -g
  1. Login to heroku on the command line
$ heroku login -i
  1. Create an application (if you don't have it already)
$ heroku create <your_application_name>
  1. Commit and push to heroku Make sure you have commited your changes and push to heroku
$ git push heroku master

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published