question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to dynamically set baseURL

See original GitHub issue

Some of my clients will receive some notifications from their servers, so I need to dynamically set the baseURL for each one of them, the only way I find it right now is passing them in the localStorage and consuming that before config are set.

Is there another way to dynamically change the baseURL?

Thanks!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
marceloavfcommented, Nov 9, 2017

No problem @christianmalek, don’t worry, I already found a way to change it by using localStorage.

Since I use electron with vue, there is no secure problem, thank you for your answer!

1reaction
christianmalekcommented, Nov 9, 2017

@marceloavf Sorry for the late answer. I forgot this issue…

I just revisited the source code and come to the conclusion that I won’t change it. I could make the baseURL accessible and create a public method in the store so that you can change the baseURLs of the resources before you create the store. But this will make the code dirty and hacky and that’s not what I want.

Maybe someone else has a better idea. But for now I can’t help you further. 😦

Read more comments on GitHub >

github_iconTop Results From Across the Web

Setting axios base url dynamically - reactjs - Stack Overflow
Make a function that returns the Axios instance with a dynamic base URL, like this: custom-axios.js import axios from 'axios'; ...
Read more >
Is it possible to have Dynamic baseURL? - support - HUGO
You can set a baseURL by passing the -b flag in the hugo command. See: gohugo.io. hugo. hugo hugo builds your site Synopsis...
Read more >
Setting axios base url dynamically · Issue #2448 - GitHub
i am getting base url from asyncstorage and i want to set it as base url for axios instance. ... const axiosInstance =...
Read more >
Steps for configuration of Base URL dynamically while ...
Hi All,. I wanted to configure the Base URL dynamically while consuming REST API in our module. Are there any steps that I...
Read more >
Cypress Dynamic BaseURL - ProgramsBuzz
The cypress URL can be dynamically used and set as the base URL in the cypress config to load the URL from the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found