An open API service indexing awesome lists of open source software.

https://github.com/kuizuo/api-service

基于 Nuxt 搭建的 API 接口服务网站
https://github.com/kuizuo/api-service

api api-server nuxt

Last synced: about 2 months ago
JSON representation

基于 Nuxt 搭建的 API 接口服务网站

Awesome Lists containing this project

README

          





Artwork from Nuxt



🧪 整理稳定、快速、好用的 API 接口




🖥 Online Preview





size
size
CI
License

## Preview

![API-Service](https://img.kuizuo.cn/KZ%20API.png)

## Features

- [x] 接口文档
- [x] 接口限流
- [x] 接口缓存
- [x] 接口测试
- [x] 接口计次
- [ ] 接口监控

## Usage

```
git clone https://github.com/kuizuo/api-service
cd api-service
pnpm i
```

### Development

```
pnpm dev
```

### Build

```
pnpm build
```

## Develop

### Server

这里使用 pm2 进行部署,配置文件 `ecosystem.config.js` 如下:

```js
module.exports = {
apps: [
{
name: 'API-Service',
exec_mode: 'cluster',
instances: '1',
PORT: 8040,
env: {
NUXT_PUBLIC_API_URL: 'https://api.kuizuo.cn',
},
script: './.output/server/index.mjs',
},
],
}
```

执行 `pm2 start ecosystem.config.js` 启动服务。

### Docker

```shell
docker buildx build . -t api-service:latest
```

### Vercel

转到 [Vercel](https://vercel.com/new) 并选择你的项目,点击 "Deploy",您的应用程序将在一分钟内上线。

### Netlify

转到 [Netlify](https://app.netlify.com/start) 并选择您的项目,点击 "Deploy site",您的应用程序将在一分钟内上线。

## Why

我个人经常与 API 接口打交道,因而收集了些常用的 api。但这些 api 接口调用方式各不相同,所以编写这个项目为了将这些接口整合到一起,进行易用性的封装,使其更易调用。

**API 接口均来自网络,如有侵权,请联系作者删除!**

## License

[MIT](https://github.com/kuizuo/api-service/blob/main/LICENSE)