You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi guys! Im creating SSR app, based on sveltekit with adapter-node and I have a problem. It is hosted behind the gateway on /some-url. Is it possible to easily get the current host pathname (in this case /some-url)? I want to refer in app to some static files by src and I wouldn't like to hardcode or put base-pathname by env variables
To clarify the base app page (/) will be accessed thru .../some-url/
I've achieved it by removing from the whole url pathname the path-id but I can't believie that there is no easier way
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi guys! Im creating SSR app, based on
sveltekit
withadapter-node
and I have a problem. It is hosted behind the gateway on/some-url
. Is it possible to easily get the current host pathname (in this case/some-url
)? I want to refer in app to some static files bysrc
and I wouldn't like to hardcode or put base-pathname by env variablesTo clarify the base app page (
/
) will be accessed thru.../some-url/
I've achieved it by removing from the whole url
pathname
thepath-id
but I can't believie that there is no easier wayThenks for help in advance
Beta Was this translation helpful? Give feedback.
All reactions