问题
I am new to node and gulp I create a project and its working fine but I am facing an issue when i am hosting my project on some web server (tomcat). All URL are pointing to root instead we need a project folder
Please guide me what i am missing
currently : http://localhost:8000/
I need something like this : http://localhost:8000/projectName/
回答1:
I've done this on applications where I have one application that essentially builds another application. They are tightly coupled in my case so I created a single repository in git for both projects.
For your case, if its only a single app & only a routing issue, I would configure apache or HAProxy to redirect http://localhost:8000/
to http://localhost:8000/projectName
. I have only done this in nginx & HAProxy but it should be easy enough with other setups. This tutorial might help.
来源:https://stackoverflow.com/questions/29004490/all-url-are-pointing-to-root-instead-we-need-a-project-folder