Hello everybody, continuous with the Svelte post series, Today I want to share one technique that normally use to connect my Web applications with ...
For further actions, you may consider blocking this person and/or reporting abuse
What did you mean by:
Are you just suggesting we get the 'baseURL' constant from somewhere more global, or that there's a way to secure/hide that value? I was under the impression the front end can be seen by pretty much anyone...
You are correct about the fact that all front-end code is always visible to the end user.
I think the recommended method the author is referring to is a .env like file (npmjs.com/package/dotenv). Which does not hide the values but makes them more variable and easier to change without having to alter your code.
You might want your front-end connecting to different base URL's depending on what environment it is running (dev, staging, prod).
Thanks for the response. Your points make sense.
Exact, the base url of the API is not a sensitive information. You can track all API calls with your browser devtools anyway
Hi. Hope you are doing well. I tried using books for JavaScript but I realised that perhaps watching someone else code and following along like in a video tutorial may be more helpful while learning JavaScript. Any free video tutorials/courses like on YouTube you know of that teach JavaScript from scratch well, ie from basics, and then moves on to like equipping me to build projects myself? Thanks. Also I might need to relearn HTML and CSS from the beginning, which YouTube tutorials could you point me towards?
Dude this is good I feel like this is missing something when I started it I didnt see anything. what about the app.js?