berkan
berkan

Reputation: 780

How to 'serve' sub folders?

I have different directories in my dist folder. How can I serve them with vercel/serve?

localhost/foo should serve the build of foo folder

localhost/bar should serve the build of bar folder

these sub folders are vue(2) builds

enter image description here

I can serve foo by serve -s dist/foo

But is it possible to serve -s dist all subfolders?

It shows file system by this way,

enter image description here

Upvotes: 0

Views: 975

Answers (1)

Arjit Tiwari
Arjit Tiwari

Reputation: 508

Yes,
Just run serve dist or serve -s dist
OR
open terminal in dist directory and run serve

It always serve all subfolders as well.

And go to http://localhost:3000/foo/, with trailing slash /
Otherwise it will not serve index.html and just list directory.

Upvotes: 1

Related Questions