Raji Muhammad
Raji Muhammad

Reputation: 35

What is the best way to integrate Nodejs and Vuejs

I want to know the best practices involved in integrating nodejs and vuejs applications.

I looking at various options and I’m not sure which is the best

Upvotes: 0

Views: 265

Answers (2)

Xenon M. Bird
Xenon M. Bird

Reputation: 58

└───your-folder
    ├───api                  // Your Nodejs server
    └───client               // Your Vue app

Create a folder like this. Now start your Node API on any port (for example 3000) and then start your Vue app on different port (for example 4000).

Now you can send any request (GET, POST, PUT etc.) from your Vue app to your Node API. In our case API origin is http://localhost:3000

Upvotes: 0

kissu
kissu

Reputation: 46761

The best approach is to have a nodejs API in one place and a VueJS app in another and to communicate between both via API calls.

Not sure which other ones there are.

Upvotes: 1

Related Questions