摘要:
1:安装跨域使用的中间件 npm i http-proxy-middleware 2:src的目录中新建立setupProxy.js 里面写入(老版本的写法不是这样的) const { createProxyMiddleware } = require("http-proxy-middleware" 阅读全文
posted @ 2021-09-17 09:07
林呀!
阅读(236)
评论(0)
推荐(0)
摘要:
1:安装mongoos npm install mongoose --save 2: 引入和使用 建一个用于公共连接 文件db.js 写入代码 var mongoose = require("mongoose"); var DB_URL = "mongodb://localhost:27017/19 阅读全文
posted @ 2021-09-02 21:10
林呀!
阅读(122)
评论(0)
推荐(0)
摘要:
node命令 npm install nrm //安装镜像切换工具 nrm ls //找到所有的镜像源 nrm use taobao //切换镜像 npm -v #显示版本,检查npm 是否正确安装。 npm install express #安装express模块 npm install -g e 阅读全文
posted @ 2021-09-02 21:05
林呀!
阅读(32)
评论(0)
推荐(0)
摘要:
阅读全文
posted @ 2021-09-02 21:00
林呀!
阅读(36)
评论(0)
推荐(0)
摘要:
阅读全文
posted @ 2021-09-02 20:59
林呀!
阅读(20)
评论(0)
推荐(0)
摘要:
阅读全文
posted @ 2021-09-02 20:51
林呀!
阅读(26)
评论(0)
推荐(0)
摘要:
module.exports = { publicPath: "./", devServer: { proxy: { '/api': { target: 'http://localhost:3000', changeOrigin: true, pathRewrite: { '^/api': '' } 阅读全文
posted @ 2021-09-02 20:50
林呀!
阅读(31)
评论(0)
推荐(0)