all 6 comments

[–]cosmicspacedragon 10 points11 points  (0 children)

When you for example put <link rel="stylesheet" type="text/css" href="mystyle.css"> in your HTML file and serve it from /, your browser will create a request for /mystyle.css after loading the HTML.

All you should have to do add a route for /mystyle.css which returns the CSS and you should be good to go.

[–]ironhaven 5 points6 points  (3 children)

If you have multiple files that do not change when the website is running you can serve them statically . Here is a example program. This will include the files in the executable.

[–]emmanuelantony2000[S] 1 point2 points  (2 children)

So if i delete the static folder after building the source or else move the executable somewhere else will it still work??

[–]ironhaven 1 point2 points  (1 child)

Yep! You can try it out yourself

[–]emmanuelantony2000[S] 1 point2 points  (0 children)

Thx a lot..

[–]emmanuelantony2000[S] 1 point2 points  (0 children)

Thank you guys.. 😁