Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/little-buddy/midway-boilerplate
基于 [email protected]+ 搭建的快速开发模版
https://github.com/little-buddy/midway-boilerplate
Last synced: about 1 month ago
JSON representation
基于 [email protected]+ 搭建的快速开发模版
- Host: GitHub
- URL: https://github.com/little-buddy/midway-boilerplate
- Owner: little-buddy
- License: mit
- Created: 2023-08-14T21:09:08.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-17T21:51:58.000Z (over 1 year ago)
- Last Synced: 2024-10-29T20:11:26.561Z (3 months ago)
- Language: TypeScript
- Homepage:
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 基于 [email protected]+ 搭建的快速开发模版
## QuickStart
see [midway docs][midway] for more detail.
### Development
```bash
$ npm i
$ npm run dev
$ open http://localhost:7001/
```### Deploy
```bash
$ npm start
```### npm scripts
- Use `npm run lint` to check code style.
- Use `npm test` to run unit test.[midway]: https://midwayjs.org
### 简单的 HTTP 请求
```JS
import {makeHttpRequest} from "@midwayjs/core"const result = await makeHttpRequest(url,{
method: 请求类型
dataType: 返回数据类型
contentType: 发送数据类型, post 需要
data:{} get query
timeout 超时
headers
})还是用 axios 替换保险
```### swagger 修饰器列表
```js
@ApiBody
@ApiExcludeEndpoint
@ApiExcludeController
@ApiHeader
@ApiHeaders
@ApiOperation
@ApiProperty
@ApiPropertyOptional
@ApiResponseProperty
@ApiQuery
@ApiResponse
@ApiTags
@ApiExtension
@ApiBasicAuth
@ApiBearerAuth
@ApiCookieAuth
@ApiOAuth2
@ApiSecurity
@ApiParam
@ApiExtraModel
```