# Starting a simple web server using HTTP.jl

**URL:** https://discourse.julialang.org/t/starting-a-simple-web-server-using-http-jl/38012
**Category:** New to Julia
**Created:** [April 22, 2020, 7:18am UTC](https://discourse.julialang.org/t/starting-a-simple-web-server-using-http-jl/38012 "2020-04-22T07:18:56Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![dmolina](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dmolina/32/5246_2.png) [@dmolina](https://discourse.julialang.org/u/dmolina)
#### Post date: [April 22, 2020, 12:30pm UTC](https://discourse.julialang.org/t/starting-a-simple-web-server-using-http-jl/38012/2 "2020-04-22T12:30:40Z")

</div>

Check the information about HTTP.Handers or the [web doc of the package](https://juliaweb.github.io/HTTP.jl/stable/public_interface/#Server-/-Handlers-1), that it has a lot of examples.

I put you an simple example that is working in my computer:

```julia
const ROUTER = HTTP.Router()
HTTP.@register(ROUTER, "GET", "/*", req->HTTP.Response(200, "Hi"))
# You can register more
HTTP.@register(ROUTER, "GET", "/bye", req->HTTP.Response(200, "Bye!"))
HTTP.serve(ROUTER, Sockets.localhost, 8081)

```

I hope it could help you.

---

_[View the full topic](https://discourse.julialang.org/t/starting-a-simple-web-server-using-http-jl/38012)._
