The directories used in the document/manual are relative to a base directory (i.e. formula_one).
Prerequisite: Current directory is the base directory.
npm installcd backend
npm installPrerequisite: Current directory is the base directory.
- Start first the backend script to get the current ip address and start the node server
# change from base directory to backend folder cd backend/ # run start script for production mode npm run production
- Change back to base directory
# change back to base directory cd ..
- Execute build script
# builds the application in a ./dist folder npm run build - Copy content of
./distfolder to a webserver
# change to backend directory
cd backend
# run server
npm run startThe app can run with defaults. That means it runs on localhost and current ip address for the host argument. The value for the port argument is 8080.
The app also works with custom values:
- --host=[ip.address] - replace this with the wanted ip address, e.g.
--host=192.168.1.10 - --port=[port] - replace this with the wanted port number, e.g.
--port=4216
# most cases (own port, default ip address and localhost)
npx vue-cli-service serve --port=[port]
# minimal
npx vue-cli-service serve
# run with special ip address and port
npx vue-cli-service serve --host=[ip.address] --port=[port]Kill a process of the app running on a special port. It can run on a default or a custom port (see Run App).
# kill running application on a port (e.g. 4216)
fuser -k [port]/tcpAdd the following to ~/Library/Application Support/Code/User/settings.json (mac os)
{
"vetur.format.defaultFormatter.js": "vscode-typescript",
"vetur.format.defaultFormatter.html": "js-beautify-html",
"javascript.format.insertSpaceBeforeFunctionParenthesis": true,
"eslint.autoFixOnSave": true,
"eslint.validate": [
{
"language": "vue",
"autoFix": true
},
{
"language": "html",
"autoFix": true
},
{
"language": "javascript",
"autoFix": true
}
]
}See: How to integrate ESLint with Vue.js and Vetur in Visual Studio Code (alligator.io)
npm run serve
npm run build
npm run test
npm run lint
npm run test:unit