Skip to content

Relocating the static directory

rhaen edited this page Dec 21, 2010 · 2 revisions

Relocating the static directory

You may want to relocate the static directory in certain environments. This might be useful for a mixed webserver setup or to split your Mojo application installation. There is an easy way to accomplish the task. Just put the following line of code before the app->start line in order to relocate the static directory.

app->static->root($absolute_path);

If you want to split your static path in a more fashioned way you can use the Mojo plugin alias for it. You can reach the source on github at: https://github.com/dotandimet/mojolicious-plugin-alias

Clone this wiki locally