Skip to content

Latest commit

Β 

History

History
57 lines (37 loc) Β· 1.11 KB

README.md

File metadata and controls

57 lines (37 loc) Β· 1.11 KB

✨ easyhttp ✨

GitHub last commit GitHub top language License

easyhttp is a simple HTTP server made for study purposes.

πŸš€ Installation

Use the package manager pip to install easyhttp.

Simply run:

pip install easyhttp

πŸ’» Quickstart

import easyhttp

app = easyhttp.App()

def index(req, res):
    res.send('<h1>It\'s working!</h1>')

app.get('/', index)

app.listen(3000)

You can also use other HTTP methods:

app.get('/', index_get)
app.post('/', index_post)
app.put('/', index_put)
app.delete('/', index_delete)

Specifying a public folder can be done as shown below:

app.public('public')

πŸ“œ License

MIT