https://github.com/bugaevc/simple-http-server-tutorial
A step-by-step walkthrough of implementing a very basic HTTP server and a webapp nanoframework in pure Python
https://github.com/bugaevc/simple-http-server-tutorial
http-server nanoframework python step-by-step tutorial
Last synced: 10 months ago
JSON representation
A step-by-step walkthrough of implementing a very basic HTTP server and a webapp nanoframework in pure Python
- Host: GitHub
- URL: https://github.com/bugaevc/simple-http-server-tutorial
- Owner: bugaevc
- License: mit
- Created: 2018-09-26T21:03:57.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-11T16:04:01.000Z (about 7 years ago)
- Last Synced: 2025-03-26T19:45:49.385Z (10 months ago)
- Topics: http-server, nanoframework, python, step-by-step, tutorial
- Language: Python
- Size: 10.7 KB
- Stars: 2
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Simple HTTP server tutorial
This tutorial is a [step-by-step walkthrough](https://github.com/bugaevc/simple-http-server-tutorial/commits/master) 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](https://github.com/bugaevc/leek) or Python's built-in [`http.server`](https://docs.python.org/3/library/http.server.html),
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.