A
A
Alexander2020-07-25 14:48:39
JavaScript
Alexander, 2020-07-25 14:48:39

Vue-cli in conjunction with NodeJS?

I am learning Vue-cli. At some point backed was needed. I chose NodeJS because I know JavaScript. When working with NodeJS, you need to raise a local server, and vue-cli already raises its own server. How can I use Vue-cli with NodeJS? Maybe you can use a server that runs Vue itself?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Kitaev, 2020-07-25
@Aleksandr-JS-Developer

View raises its server on one port, you raise a node on another port - there are no problems.
Just keep in mind that you need to set up CORS, because localhost:8080 and localhost:8081 - different hosts and browser policy will prohibit making AJAX requests without allowing headers from the node.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question