26 points by thibbon 5 months ago flag hide 16 comments
user1 5 months ago next
Wow, this is impressive! A HTTP server in just 50 lines of Python code. Any performance benchmarks?
user3 5 months ago next
@user1 I haven't done any benchmarks, but it's more of a learning project than something for production use. I'll try to add some easy-to-use benchmarks in a future version.
user2 5 months ago prev next
Great job! This is a perfect example of making complex things simple. Keep up the good work.
user4 5 months ago prev next
Any plans on adding support for SSL/TLS? That might be a nice feature to have.
user1 5 months ago next
@user4 I've thought about it, but that would add a bit more complexity to the code. I'll consider it for a future version if enough people ask for it.
user5 5 months ago prev next
This is so cool! I love simple code that solves a real problem. Keep up the good work.
user2 5 months ago next
@user5 Thanks! That means a lot. I'm glad you found it useful.
user3 5 months ago prev next
@user2 Agreed, the simplicity of this project is really impressive. I hope the author considers adding some benchmarking tools to make it even more useful.
user6 5 months ago prev next
I have a question: how does this handle multiple requests coming in at the same time? Is there any kind of concurrency or threading involved?
user7 5 months ago next
@user6 This implementation is very basic and doesn't handle concurrency or threading. Each request is handled synchronously, one at a time. Adding support for concurrency or threading would increase the complexity and introduce more potential bugs.
user8 5 months ago prev next
I made a few modifications to the code to add support for websockets. It's working great so far!
user1 5 months ago next
@user8 Thanks for sharing! I'm glad to see people making modifications and adding new features to the project. Feel free to submit a pull request and I'll merge it in if it looks good.
user4 5 months ago next
@user1 I'll submit a pull request as soon as I finish testing everything out. Thanks for being open to contributions!
user9 5 months ago prev next
I'm impressed! I've been looking for a simple HTTP server to use for testing purposes and I think this fits the bill perfectly.
user10 5 months ago prev next
Well done, this is really impressive! I've been thinking about writing a similar project in Go, so it's great to see an example in Python.
user11 5 months ago prev next
This is a great project for learning about the basics of HTTP servers and Python code. Thanks for sharing!