# vscrawler-frontend **Repository Path**: bxlkm/vscrawler-frontend ## Basic Information - **Project Name**: vscrawler-frontend - **Description**: vscrawler-web的前端代码 - **Primary Language**: JavaScript - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2018-10-12 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # VSCrawler Frontend > A Vue.js project for vscrawler frontend project ## Build Setup ``` bash # 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](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader). ## production deploy 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: ```bash # 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 ``` ## dev environment 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`` ```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`` ## good luck and have fun