Giter Site home page Giter Site logo

contactapp's Introduction

ContactApp

Built a Python Web App using Flask, PostgreSQL & Heroku.

The Web App is accessible via http://steffen-feedback-app1.herokuapp.com

As soon as you submit your request, an email is sent to my personal email adress and my database gets updated!

used tech

Quick Start

Requirement: Add your DATABASE URI in app.py and your mail params in send_mail.py

Install dependencies

pipenv shell
pipenv install

Serve on localhost:5000

python app.py

Python Heroku Deployment

Steps to create a postgres database and deply a Python app to Heroku

Install guinicorn locally

pipenv install gunicorn
or
pip install gunicorn

Install Heroku CLI

https://devcenter.heroku.com/articles/heroku-cli

Login via CLI

heroku login

Create app

heroku create appname

Create database

heroku addons:create heroku-postgresql:hobby-dev --app appname

Get URI

heroku config --app appname

# Add to your app

Create Procfile

touch Procfile

# Add this
web: gunicorn app:app

Create requirements.txt

pip freeze > requirements.txt

Create runtime.txt

touch runtime.txt

# Add this
python-3.7.2

Deploy with Git

git init
git add . && git commit -m 'Deploy'
heroku git:remote -a appname
git push heroku master

Add table to remote database

heroku run python
>>> from app import db
>>> db.create_all()
>>>exit()

Visit app

heroku open

contactapp's People

Contributors

sknoedler avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.