Ad

How Can I Deploy A Vue.js App On A Tomcat?

- 1 answer

I have a vue.js application and I want to deploy it on a server on a tomcat, it's posible and how ?

Ad

Answer

Yes of course you can, an extended tomcat app server has a structure like this:

[it is supposed that you are going to deploy a static application into tomcat]

apache-tomcat-x.y.zz/
bin/
conf/
lib/
logs/
temp/
webapps/
work/
....

just create a folder in weapps folder[e.g test] and put your static files inside it[just remember to take care of your relative path of resources], then fire up tomcat and in your browser refer to a link like this: http://localhost:8080/test/your_index_file.html

However there is point with is worth mentioning, actually tomcat is a web server[to be more precise it's a servlet container which is used to deploy java web applications into it], you should use a http sever somethig like apache_http_server or nginx.

Ad
source: stackoverflow.com
Ad