fresh icon indicating copy to clipboard operation
fresh copied to clipboard

Can't choose base server route

Open Omig12 opened this issue 1 year ago • 4 comments

I'm trying to build a site with the main landing page being an existing static index.html. I can´t find how to point to this route as the base route for the server in the Documentation. My goal is to avoid rewriting the existing static content and just build other interactive content alongside it. Any suggestions or examples are welcomed. Thanks! :)

Omig12 avatar Aug 20 '22 15:08 Omig12

I have similar task. No need to use rendering for a static index.html

alexbezhan avatar Aug 21 '22 10:08 alexbezhan

When I start the server, even if there is an index.html in the static folder, localhost:8080/ returns nothing unless I search for localhost:8080/index.html. I might be misunderstanding the documentation, but I think it suggests that the existence of a static file takes priority over any equivalently named route, and I assumed that would be the case for the / route.

Omig12 avatar Aug 22 '22 17:08 Omig12

Interesting! I'll think about how to best approach this.

lucacasonato avatar Aug 23 '22 22:08 lucacasonato

Interesting! I'll think about how to best approach this.

@lucacasonato I write a simple pr for this issue. user can add the static html to ./staticRoute dir

https://github.com/denoland/fresh/pull/655

can you be my mentor for this feature?

rottenpen avatar Aug 24 '22 16:08 rottenpen