| | |
| | | ```bash |
| | | $ npm i |
| | | $ npm run dev |
| | | $ open http://localhost:8001/ |
| | | $ open http://localhost:/ |
| | | ``` |
| | | |
| | | 注: `npm i`如果安装失败可以尝试使用[cnpm](https://developer.aliyun.com/mirror/NPM?from=tnpm),或者切换您的镜像源 |
| | |
| | | const WebFramework = require('@midwayjs/web').Framework; |
| | | const web = new WebFramework().configure({ |
| | | port: 8001, |
| | | port: 9001, |
| | | }); |
| | | |
| | | const { Bootstrap } = require('@midwayjs/bootstrap'); |
| | |
| | | "node": ">=12.0.0" |
| | | }, |
| | | "scripts": { |
| | | "start": "egg-scripts start --daemon --title=cool-admin-midway --framework=@midwayjs/web --port=8001", |
| | | "start": "egg-scripts start --daemon --title=cool-admin-midway --framework=@midwayjs/web --port=9001", |
| | | "stop": "egg-scripts stop --title=cool-admin-midway", |
| | | "start_build": "npm run build && cross-env NODE_ENV=development midway-bin dev", |
| | | "docker": "egg-scripts start --title=cool-admin-midway --framework=@midwayjs/web --sticky", |
| | | "dev": "cross-env ets && cross-env NODE_ENV=local TS_NODE_TYPE_CHECK=false TS_NODE_TRANSPILE_ONLY=true midway-bin dev --ts --port=8001 --sticky", |
| | | "dev": "cross-env ets && cross-env NODE_ENV=local TS_NODE_TYPE_CHECK=false TS_NODE_TRANSPILE_ONLY=true midway-bin dev --ts --port=9001 --sticky", |
| | | "test": "midway-bin test", |
| | | "cov": "midway-bin cov", |
| | | "lint": "mwts check", |
| | |
| | | ```bash |
| | | $ npm i |
| | | $ npm run dev |
| | | $ open http://localhost:8001/ |
| | | $ open http://localhost:9001/ |
| | | ``` |
| | | |
| | | 注: `npm i`如果安装失败可以尝试使用[cnpm](https://developer.aliyun.com/mirror/NPM?from=tnpm),或者切换您的镜像源 |
| | |
| | | // 文件上传 |
| | | file: { |
| | | // 文件路径前缀 本地上传模式下 有效 |
| | | // domain: 'http://127.0.0.1:8001', |
| | | // domain: 'http://127.0.0.1:', |
| | | domain: 'http://112.74.77.127:9100/hn', |
| | | }, |
| | | } as CoolConfig; |
| | |
| | | view, |
| | | // 必须,不可移除, https://typeorm.io 打不开? https://typeorm.biunav.com/zh/ |
| | | orm, |
| | | // swagger文档 访问地址 http://127.0.0.1:8001/swagger-ui/index.html |
| | | // swagger文档 访问地址 http://127.0.0.1:/swagger-ui/index.html |
| | | { |
| | | component: swagger, |
| | | enabledEnvironment: ['local'], |