https://github.com/waitaction/vote-api
简易投票服务
https://github.com/waitaction/vote-api
Last synced: about 2 months ago
JSON representation
简易投票服务
- Host: GitHub
- URL: https://github.com/waitaction/vote-api
- Owner: waitaction
- License: apache-2.0
- Created: 2021-03-21T04:53:49.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-03-25T03:58:13.000Z (about 5 years ago)
- Last Synced: 2025-12-28T20:53:58.683Z (6 months ago)
- Language: TypeScript
- Size: 625 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## 简介
简易投票服务接口,使用`nestjs`、`typeorm`、`mongodb`编写
## 安装
```bash
$ npm install
```
如果因网络原因,也可以运行
```bash
$ yarn install
```
## 运行
```bash
$ npm run start
```
运行成功之后,可访问`http://localhost:3000/api`查看接口文档
登录授权使用`jwt`
默认帐号:admin
默认密码:admin
## 调试
```bash
$ npm run start:debug
```
## 测试
```bash
# e2e tests
$ npm run test:e2e
```
## 其它说明
1.投票结果监控和邮件通知相关方法写在了`src/app.module.ts`
2.全局异常处理`src/main.ts`和`src/core/http-exception.filter.ts`
3.邮件服务器`src/lib/mail-server.ts`
4.mongodb配置`src/app.module.ts`
5.e2e测试`test/app.e2e-spec.ts`
6.数据库实体类`src/entity`
7.接口文档`http://localhost:3000/api`