Skip to content

luisbrandino/easyhttp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

✨ 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

Releases

No releases published

Packages

No packages published

Languages