A Vue.js project for vscrawler frontend project
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
# build for production and view the bundle analyzer report
npm run build --report
# run unit tests
npm run unit
# run e2e tests
npm run e2e
# run all tests
npm test
For a detailed explanation on how things work, check out the guide and docs for vue-loader.
vscrawler do not associate frontend project and backend project with a building tool,generally the two project need to be isolated. user for vscrawler do work in java and dependent java backend project in many time. maybe a java programmer do not know how to use webpack to build this project or how to write vue code. it`s difficult to setup a npm environment.
so, you need package a production code use frontend building tool,and copy out file into javaEE WebApp directory in manual.
the quick deploy command like this:
# install dependencies
npm install
# build for production with minification
npm run build
# out file will in "./dist/" directory,so copy to backend
cp -rf ./dist/ pathToBackendPeoject/vscrawler-web/src/main/resource/static/
#then build backend project
when design vscrawler frontend,we need reference local css | js | html
resource,and invoke backend api from vscrawler backend.
so we use a webpack server to load css | js | html
,and forward request into backend with a proxy setting.
the proxy setting file ./config/index.js
const proxy = 'http://localhost:8080'
this config indicate there is a backend project running on http://localhost:8080
,wo start tomcat server on port 8080
,and start frontend server on port 8081
with command
npm run dev
and then open a browser for frontend dev environment with url http://localhost:8081
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。