Javalin: Autorefresh HTML/CSS/Javascript

Created on 26 Oct 2020  路  2Comments  路  Source: tipsy/javalin

Is there any way to autorefresh changed html/css/js while the server is running, because restarting the server everytime I change something while developing does take quite a bit of time.

QUESTION

All 2 comments

Hi @gringofe ! The reason this is happening is (most likely) because you're running from an IDE, which compiles and launches a jar when you run your server. This jar contains a copy of your html/css/js files, but not the actual files themselves.

If you point your server to the actual files, by using addStaticFiles("src/path/to/dir", Location.EXTERNAL), you should be able to see changes immediately.

Yep it's working now - thank you very much for your quick response!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mkpaz picture mkpaz  路  4Comments

JosefEvAlloc picture JosefEvAlloc  路  5Comments

valtterip picture valtterip  路  5Comments

spinscale picture spinscale  路  3Comments

jonerer picture jonerer  路  4Comments