Skip to content

bugaevc/simple-http-server-tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Simple HTTP server tutorial

This tutorial is a step-by-step walkthrough of implementing a very basic HTTP server and a nanoframework for web apps in pure Python on top of bare TCP sockets. The server won't be as advanced or feature-reach as leek or Python's built-in http.server, and the nanoframework won't be as complete as Flask, but they have enough functionality to support parsing basic GET and POST requests, dispatching them to a collection of handlers and sending back the response.

The server and nanoframework implementation takes up about 150 lines of Python code; it's followed by another 50 lines implementing a simple to-do list webapp on top of the nanoframework to demonstrate using its API and make it possible to run and test the whole thing.

About

A step-by-step walkthrough of implementing a very basic HTTP server and a webapp nanoframework in pure Python

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages