2 Star 4 Fork 4

virjar / vscrawler-frontend

Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Without author's permission, this code is only for learning and cannot be used for other purposes.
Clone or download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

VSCrawler Frontend

A Vue.js project for vscrawler frontend project

Build Setup

# 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.

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:

# 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

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

Comments ( 0 )

Sign in for post a comment

About

vscrawler-web的前端代码 spread retract
Cancel

Releases

No release

Contributors

All

Activities

load more
can not load any more
JavaScript
1
https://gitee.com/virjar/vscrawler-frontend.git
git@gitee.com:virjar/vscrawler-frontend.git
virjar
vscrawler-frontend
vscrawler-frontend
master

Search