A
A
Andrew2020-03-12 23:01:39
Software Deployment
Andrew, 2020-03-12 23:01:39

Which SPA deployment option on Vue is more correct?

Now I do it as follows: in the backend on express in the static folder, I put the build of my application. I give it like this:

app.get(/.*/, (req, res) => res.sendFile(__dirname + '/static/index.html'))


This method was spied on for a long time in foreign deployment tutorials. Quite working, I still do not see any particular disadvantages (for small and medium projects).

At the same time, I dive into the topic of deployment and understand that the front and back can be independent docker containers. And yes, there are plenty of ways to do it.

And which of the options is correct / optimal / flexible?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaly Karasik, 2020-03-13
@vitaly_il1

It is better to lay out static sites on S3 or another service. Advantage (for more or less serious loads) - the backend server will not be loaded.
https://medium.com/employbl/host-a-vue-js-website-...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question