Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

252
Visualizações
how to use properties file in vueJs?

hi is there any way to store most usable values and properties in a file like yml - property file and ...

and use them in vueJs components

in java we have spring and it helps us using yml and property file properties in project

is there any thing same in vueJs

about 4 years ago · Juan Pablo Isaza
3 Respostas
Responde à pergunta

0

In vueJs you can use .env files easily. In you .env file you can define properties starting with VUE_APP_ and them will be available for you in the whole app.

Ex: .env

    VUE_APP_API_URL=http://localhost:5000

To read this property just do it.

process.env.VUE_APP_API_URL

More info here.

about 4 years ago · Juan Pablo Isaza Relatório

0

you can build an object in a .js file and import that obj as your configuration.
no file system exists in pure front-end
or you can get your configuration from a backend api

about 4 years ago · Juan Pablo Isaza Relatório

0

You can create a normal JS file and import in the Vue.

Or you might need to read about .env file because between those 2 files you gonna need for constants

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda