skip to Main Content

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

2

Answers


  1. 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.

    Login or Signup to reply.
  2. └───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

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search