diamondman / http-rest-tutorial

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

INTRO

This project aims to familiarize the reader with most of what goes into a modern web application. It attempts to introduce the reader to:

  • HTTP
    • Requests
    • Responses
    • Headers
    • How the browser sends HTTP Requests
    • How to send HTTP Requests with CURL (command line)
  • RESTful Interfaces
    • GET/POST/PUT/DELETE Requests
    • GET and POST data
  • Implementing a Python Webserver with Flask
    • Routes
    • Templates
    • Working with Requests and Responses
    • Databases and Object Relational Models (ORM)

GETTING THE PROJECT

This project is maintained with git so the easiest way to get it is with the following command:

sudo apt-get install git
git clone https://github.com/diamondman/http-rest-tutorial.git

The previous command will copy all of this project's files, including this readme, into a new folder called 'http-rest-tutorial' on your computer. You are able to safely move this folder somewhere else after you copy it down from git.

INSTALL

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install python3  python3-pip libsqlite3-0
sudo pip3 --upgrade install flask sqlalchemy flask-sqlalchemy ipython watchdog

RUNNING

In the terminal run the following (replace things in { } with correct values)

cd {path to http-rest-tutorial}
./main.py

The server will start in the terminal you ran the command in. It will give you a URL like http://127.0.0.1:5000. Go there in a web browser and you will see the web page the server is hosting.

About


Languages

Language:HTML 83.6%Language:Python 15.6%Language:CSS 0.7%