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

267
Views
How can I split my Vue js project into development and test?

I want to divide my vuejs frontend project into two parts as development and test. In the development part, I want to work in my local and request the example:8010 urline, and in the test part, I want to send a request to the example:80 address. How can I do this, I did a source search but couldn't find anything.

Example of a request I wrote:

      var formData = new FormData();
  formData.append('file', this.image[0]);
  await axios
    .post('example', formData, {
      headers: {
        Authorization: `Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6fdsaeqImNoZ3VuYXkzQGdtYWlsLmNvbqSIsImlkIjoxLCJ0eXBlIjoxLCJpYXQiOjE2NDU0NDUxMjR9.Kg8NcFiAKtBHxkQsRwl2pO6svp7SDQSQw13SJ4xe1vc`,
      },
    })

    .then((response) => {
      console.log(response.data.id);

    
    })
    .catch((error) => {
      console.log(error);
    });
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Serkan

You can use .env files for your environments. You can add dotenv package your project, or you can give parameters inside of your scripts part of you package.json

here you can follow this page to use your env variables inside vue app. Keep in mind you must start VUE_APP for your variables:

VUE_APP_BASE_API = 'yourapplink/api'

You should create 2 .env files 1 for your local development other for your production and you can add as much as you like.

You can create .env.development and put your variables in it then start your vue app with:

vue-cli-service build --mode development

And you should see app using your .env.development file.

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!