The goal was to have both apps running on the same port.
Install dependencies :
yarn install
Setup DB connexion :
In /config
create a config.js file :
const config = {
host: "localhost",
port: 3306,
user: "root",
password: "",
database: "express-sql"
}
export default config;
The Vue app is localized in /src
.
There's only one package.json
for both apps.
To start Node Server :
yarn start
To start Vue Client :
yarn serve
yarn prod
This command will build the app, copy the /dist
folder to the /client
folder (overwritting) and start the node instance.