V
V
Valery Khizhevsky2018-07-04 11:44:03
Node.js
Valery Khizhevsky, 2018-07-04 11:44:03

How to run webpack app on server?

Good day.
The application on VUE js on my machine starts normally. But there is a server and the application was transferred to it and everything starts there, neo is not displayed in the browser. I tried to specify both localhost and server ip in the host, nothing helped, what could be the problem? Application on webpack

Answer the question

In order to leave comments, you need to log in

3 answer(s)
L
Lev Roskoshin, 2018-07-04
@Roshette

It's most likely not the app. If there are no errors in the console when running it, then I think everything is fine with it. It’s trite to check if you specified the port, since applications on the node often start on port 3000. Also check if the application is available locally with curl. If everything is ok, check your firewall settings. And in the last case, you can look in package.json and if dev starts from under the webpack dev server , then it is usually not available externally. In this case, add --host ip of the server to the end, for example --host 0.0.0.0 .

D
Dark_Scorpion, 2018-07-04
@Dark_Scorpion

Webpack is just a bundler, not an engine. You need to build and include the script in the html file.
A more detailed description of the deployment is needed to understand where the error is.

M
mShpakov, 2018-07-04
@mShpakov

As I understand it, you need to install nginx and proxy from it to the
node And it's better to run the server via pm2 + nginx

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question