docs: add the recommendation to use configJSON.wwwroot instead of "." for SVR.JS 2.x and 3.x mods
Some checks failed
Deploy Next.js application / deploy (push) Failing after 10m5s

This commit is contained in:
Dorian Niemiec 2024-12-09 00:42:46 +01:00
parent 6583fd10a0
commit c265b0ffbd

View file

@ -48,7 +48,7 @@ These methods are defined inside _Mod.prototype_ object. Both methods return a f
The reference to file in the SVR.JS installation directory is `__dirname + "/../../../filename"` (replace `filename` with your desired file name).
Current working directory (`process.cwd()`) is SVR.JS web root.
Current working directory (`process.cwd()`) is SVR.JS web root. It's recommended to use the _configJSON.wwwroot_ property instead though, if targeting SVR.JS 4.2.0 or newer.
A typical _index.js_ file for a mod may look like this: