I'm assuming here that the client-side code is invoked from some dynamically-generated HTML.
If the amount of "configuration" data is fairly small, you could pass it via data-*
attributes in the generated HTML, e.g. <body data-static="http://host:port/static/content">
or, if it's bigger, in an inline <script id="config" type="application/json">
element.
The key here is to avoid dynamically generating code whose only purpose is to represent data (40 years ago Kernighan and Plauger, in The Elements of Programming Style wrote that they wondered just how much much of the daily activity in a typical computer center amounted to simply entering parameters via the compiler). With an interpreted language it's easy for the code/data distinction to get blurred, but it's worth keeping them separate in your mind.
P.S. Your English is better than that in most questions I've seen.