# git合码小工具 **Repository Path**: gaoyuqi/gitTools ## Basic Information - **Project Name**: git合码小工具 - **Description**: git操作本地小工具 - **Primary Language**: Unknown - **License**: MulanPSL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-03-17 - **Last Updated**: 2023-09-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ### 『Vue+Express』前后端联合案例【基础案例】 #### client ```js npm i vite -D npm i @vitejs/plugin-vue -D npm i vue@3.2.26 npm i axios qs lodash ``` #### server ```js npm i body-parser -D npm i express ``` #### vite.config.js ```js import {defineConfig} from 'vite'; import vue from '@vitejs/plugin-vue'; export default defineConfig ({ plugins: [vue()], resolve: { extensions: ['.vue', '.js', '.jsx'] }, server: { proxy: { '/api': { target: 'http://localhost:8081', changeOrigin: true, rewrite: path => path.replace(/^\/api/, '') } } } }) ``` #### Server/app.js ```js const express = require('express'), bodyParser = require('body-parser'); const app = express(); app.use(bodyParser.urlencoded({extended: true})) app.use(bodyParser.json()); app.listen('8081', () => { console.log('Server is PORT 8081!!!') }) ```