Giter Club home page Giter Club logo

eb-flaskapp's Introduction

Teeny Flask App

I was asked to write a little web app for a small organization that could apply rudimentary password protection to some documents. The minimal needs of the organization allow a single username and password to be shared by all users.

I first thought of Django but a database was not desired, so I went for the simpler option of using Flask. I drew on the following sources.

AWS deployment

First, do this (or whatever is equivalent) on your development machine.

sudo apt-get install -y ec2-ami-tools ec2-api-tools

Let's skip the virtual machine and go straight to EC2.

  • Go to the EC2 console page and hit the big blue Launch Instance button.
  • Choose the Ubuntu 64-bit server option and hit Continue.
  • On the next page, make sure Auto-assign Public IP is ENABLED and that the instance belongs to a PUBLIC subnet.
  • Two pages later, make sure you choose a security group with inbound traffic allowed on ports 22 (ssh) and 80 (http) for source 0.0.0.0/0, and all outbound traffic allowed for destination 0.0.0.0/0. Choose a key pair that you know you have access to.
  • Review all your settings and launch. It will take several minutes for the instance to boot up.

Once the instance has started, do this on your local machine:

INSTANCE=ec2-52-1-12-222.compute-1.amazonaws.com     # for example
scp -i ~/.ec2/ec2.pem prep.sh ubuntu@${INSTANCE}:~
scp -i ~/.ec2/ec2.pem cruft.uue ubuntu@${INSTANCE}:~
ssh -i ~/.ec2/ec2.pem ubuntu@${INSTANCE}

Having SSHed into the instance, run prep.sh. Then you can cd into the eb-flaskapp directory and run the go.sh script. This will start a server process that runs the app.

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.