Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

150
Views
Obtenga JSON antes de que se inicien las variables estáticas

Estoy trabajando con algún valor ENV en el archivo JSON. En mi caso, quiero obtener todas las variables env antes del inicio de la aplicación y el inicio de las variables estáticas. Intento buscarlo en index.html, pero aún persigue variables estáticas. ¿Hay alguna manera de que pueda hacerlo?

 <script type="text/javascript"> fetch('config/config.json') .then((res) => res.json()) .then((data) => { console.log("config: ", data); }) .catch((e) => { console.log(e) }) </script>

Gracias.

PD: lo siento por mi inglés

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

bueno, creo que deberías crear funciones init() y start() poner dentro de ellas la lógica de iniciación e iniciar la aplicación, luego llamar a estas funciones desde dentro fetch().then().then(data=>{}).

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!