node.js - How to deploy vue server-side rendering online
巴扎黑
巴扎黑 2017-06-05 11:10:55
0
2
713

Taking the official hackernews example as an example, the packaged file does not have an html file, so how to deploy it on the server

I feel that servicew-worker.js is the key. The official example supports pwa, which makes it a bit complicated. The company uses PHP for the backend and Vue for the frontend. Does anyone know how to solve this problem? I have been working on this problem on Saturday and Sunday. I am confused and have not found a solution. I have not found any results on Google and Github.

巴扎黑
巴扎黑

reply all(2)
習慣沉默

You need to run nodejs on the server side. You need to use a renderer provided by vue to generate an html string from the serverbundle. This renderer is written in js. If you want to run it on the server side, you need nodejs

为情所困

Problem solved, I realized I was too stupid. In fact, I run my own project locally, using node as the server and mongodb as the database. I just need to start two services at the same time, namely server.js and app.js running on the server

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template