From cb0a813fdbb1c84a5cfe8489078ae7d7d836e6ad Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Sun, 6 Oct 2024 07:22:55 +0200 Subject: [PATCH] docs: add the notes for the SvelteKit integration mod --- pages/docs/mod-notes.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/pages/docs/mod-notes.md b/pages/docs/mod-notes.md index 8455465..d037db9 100644 --- a/pages/docs/mod-notes.md +++ b/pages/docs/mod-notes.md @@ -148,6 +148,36 @@ reverse-proxy-mod is a mod, that enables SVR.JS to do reverse proxy functionalit _Notes moved to [SVR.JS documentation.](/docs/config/reverse-proxy-config)_ _View the [change log.](/changelog/reverse-proxy-mod)_ +## SvelteKit integration + +SvelteKit integration is a mod, that enables SVR.JS to serve SvelteKit applications. + +The webroot (_wwwroot_ _config.json_ property) serves as a SvelteKit application directory. It's recommended to set the owner of the SvelteKit application directory (around with all the files in it) as the user, on which SVR.JS is running (usually "svrjs"). + +It's also recommended to forbid the access to ".env" file, ".svelte-kit" and ".git" directories, in case SvelteKit integration mod fails to load. You can set up _nonStandardCodes_ _config.json_ property like this: +```json +{ + "nonStandardCodes": [ + { + "scode": 403, + "regex": "/^\\/\\.env(?:\\.local|\\.production)?(?:$|[#?])/" + }, + { + "scode": 403, + "regex": "/^\\/\\.git/" + }, + { + "scode": 403, + "regex": "/^\\/\\.svelte-kit(?:$|[\\/#?])/" + }, + ...other non-standard codes... + ], + ...other config.json properties... +} +``` + +_View the [change log.](/changelog/sveltekit-integration)_ + ## YellowSquare YellowSquare is a JSGI (JavaScript Gateway Interface) engine.