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

112
Views
how to run multiple vue inside express

first, im not good at english, sorry for that

im making a personal portfolio site with vue3, express. in express, main vue project is rendered, and my many sub proejct file(static html, vue etc..) are in project folder

here is my folder structure,

frontend
│  └ (main vue project)
│
backend (express)
   │ kinder (sub vue project)
   │ dist (main vue project builded here)
   │  │ project
   │  │   └ (sub projects here)
   │  │ 
   │  └ ...
   │
   │ node_modules
   │ public
   │ src
   └ ...

(i dosen't matter where is my sub vue project(kinder) folder)

in case of static html project, just add "/project/projectName/index.html" to address, but builded vue project cause route confusion. so i tried so may solution like change route history mode to hash mode and setting pathRewrite, baseUrl, etc on vue.config.js file but nothing success.

i just know about html, css, js, vue so my first time use server side language. just google it, i found solution that run multiple app in one server. but i have no clue about server.

even if i cant get explaination about solution, but can i get some hint that solve this problem? just throw simple solution keyword, then i will google it very hard! i love this!

summary

  1. i want run two vue app in one express
  2. but i have no clue about server language
  3. can i get some solution or hint?
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I guess that your static files in backend/dist/ is served by express, and using express.static middleware.

As the document says, you can find the route config code in express, then change it like this:

// main vue project
app.use('/main', express.static('dist/'));
// sub vue project
app.use('/kinder', express.static('dist/project/kinder'));

Now, you can visit two vue app from different url:

http://www.xxx.xx/main/index.html
http://www.xxx.xx/kinder/index.html
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!