i have a nodejs expressjs app which uses slack, jsforce, and a internal api to perform some processes and syncing. I need to add a couple of pages which must use the same port 80 along with the api - i can have an api endpoint that provides some data which needs to be presented to the user. I would like to use vuejs, but i'm currently running pug which i'll still want to keep. what's the best way to do this
i have a nodejs expressjs app which uses slack, jsforce, and a internal api to perform some processes and syncing. I need to add a couple of pages which must use the same port 80 along with the api - i can have an api endpoint that provides some data which needs to be presented to the user. I would like to use vuejs, but i'm currently running pug which i'll still want to keep. what's the best way to do this?

You can achieve this by using a combination of Express.js for your API and Vue.js for your frontend SPA (Single Page Application). Here's a general outline of the steps you can follow:

1. **Set up your Express.js API:**
   - Continue using Express.js for your API endpoints. Make sure to expose the necessary data as JSON responses.

2. **Set up your Vue.js SPA:**
   - Install Vue CLI by running `npm install -g @vue/cli`.
   - Create a new Vue.js project by running `vue create my-vue-app`.
   - Navigate to the newly created project folder: `cd my-vue-app`.
   - Install Vue Router for navigation between different views: `vue add router`.
   - Install Axios for making HTTP requests to your Express.js API: `vue add axios`.

3. **Integrate Vue.js with Express.js:**
   - In your Vue.js project, create a `main.js` file in the `src` folder.
   - In `main.js`, import Vue Router and create a new router instance. Define routes for your views and specify the components to be used for each route.
   - Create your views as separate Vue components in the `src
The best way to achieve this is to set up a reverse proxy with Node.js. This will allow you to run your Vue application on port 80, while the API is still running on port 8080. The reverse proxy will act as a gateway between the two, allowing both applications to run on the same port.