Static Files
Static files, like stylesheets and javascript files can be handled easily by calling App.Static
:
App.Static("/static/", "static")
App.Static("/static/", "resources")
The first argument is the URL path for static files, the second argument is the path of the folder holding static files on your filesystem. Please notice that Golf supports serving multiple folders into one URL root PATH, which means that if you set Golf like the above example, when user requested /static/style.css
, Golf will firstly lookup the file style.css
in the folder static
, and continue looking up the same file in the folder resources
if it is not found in the previous folder.
Updated less than a minute ago