# Bukdu, how to display favicon.ico

**URL:** <https://discourse.julialang.org/t/bukdu-how-to-display-favicon-ico/54123>\
**Category:** Community\
**Tags:** question, package\
**Created:** [January 28, 2021, 2:01pm UTC](https://discourse.julialang.org/t/bukdu-how-to-display-favicon-ico/54123 "2021-01-28T14:01:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rbontekoe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rbontekoe/32/5981_2.png) [@rbontekoe](https://discourse.julialang.org/u/rbontekoe)\
**Post date:** [January 28, 2021, 2:01pm UTC](https://discourse.julialang.org/t/bukdu-how-to-display-favicon-ico/54123/1 "2021-01-28T14:01:15Z")

</div>

I have built a simple website with **Bukdu**. It works fine, except that it gives a 404 error message because it does not find favicon.ico. `favicon.ico` is stored in the base directory.

```julia
Bukdu Listening on 0.0.0.0:8004
INFO: GET WebController index 200 /
INFO: GET MissingController not_found 404 /favicon.ico

```

I am running the application from a [notebook](https://github.com/rbontekoe/TestAppliAR/blob/master/website.ipynb). The routes are:

```julia
routes() do
  get("/", WebController, index) # the index function is defined in the file functions.jl
  get("/agingreport", WebController, aging_report)
  get("/gl", WebController, gl)
end;

```

Tried to define an extra route but was not successful. How could I solve this?

---

<div class="post-metadata">

**Author:** ![wookyoung](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wookyoung/32/157_2.png) [@wookyoung](https://discourse.julialang.org/u/wookyoung)\
**Post date:** [January 29, 2021, 4:05pm UTC](https://discourse.julialang.org/t/bukdu-how-to-display-favicon-ico/54123/2 "2021-01-29T16:05:06Z")

</div>

you could `plug` the `Static` plugin.

```julia
plug(::Type{Static}; at::String, from::String, only::Union{Vector{String},Nothing}=nothing, indexfile="index.html")

```

see some examples:

> <https://github.com/wookay/Bukdu.jl/blob/master/test/bukdu/plugs/static.jl>

> <https://github.com/wookay/heroku-sevenstars/blob/master/sevenstars.jl#L28>

---

<div class="post-metadata">

**Author:** ![rbontekoe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rbontekoe/32/5981_2.png) [@rbontekoe](https://discourse.julialang.org/u/rbontekoe)\
**Post date:** [January 31, 2021, 10:33am UTC](https://discourse.julialang.org/t/bukdu-how-to-display-favicon-ico/54123/3 "2021-01-31T10:33:03Z")

</div>

@wookyoung, thank you. It works great.

I created a folder public with favicon.ico and changed the routes as follows:

```julia
routes() do
  get("/", WebController, index)
  get("/agingreport", WebController, aging_report)
  get("/gl", WebController, gl)
  plug(Plug.Static, at="/", from=normpath(@ __DIR__ , "public"))
end

```

Output:

```julia
Bukdu Listening on 0.0.0.0:8000
INFO: GET WebController index 200 /
INFO: GET StaticController readfile 200 /favicon.ico
INFO: GET WebController aging_report 200 /agingreport

```
