Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/supervons/explorekoa
Koa2 + Typescript 构建的后端项目,全栈工程师必学!!!
https://github.com/supervons/explorekoa
koa koa-demo koa-redis koa2 koa2-demo nodejs-server typeorm typescript
Last synced: 2 months ago
JSON representation
Koa2 + Typescript 构建的后端项目,全栈工程师必学!!!
- Host: GitHub
- URL: https://github.com/supervons/explorekoa
- Owner: supervons
- Created: 2021-05-23T09:52:15.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-20T09:25:20.000Z (over 1 year ago)
- Last Synced: 2024-10-12T10:18:34.177Z (3 months ago)
- Topics: koa, koa-demo, koa-redis, koa2, koa2-demo, nodejs-server, typeorm, typescript
- Language: TypeScript
- Homepage:
- Size: 333 KB
- Stars: 28
- Watchers: 2
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.en.md
Awesome Lists containing this project
README
[简体中文](./README.md) | [English](./README.en.md)
### KOA2 + TypeScript built back-end projects that full stack engineers must learn !!!
The front-end project address: https://github.com/supervons/ExploreRN
### Finished
- [x] Project Init
- [x] Login and Register
- [x] Api add authentication - JWT
- [x] Update password and user information
- [x] CURD function for profile information such as avatar, theme and motto
- [x] WebSocket API Demo
- [x] Send email
- [x] cabin + axe + signale log middleware### TODO-LIST
- [ ] Change `typeorm` to `prisma`
- [ ] SQL optimize
- [ ] Redis-based list query acceleration### Project Start - Develop
```
npm install
npm run start
```### Project pm2 - Deploy
```
npm run build
npm run pro
```### PROJECT DIR INTRODUCE
```
.
├── src
│ ├── controller // controller
│ ├── entity
│ ├── redis //redis config
│ ├── router //route config
│ ├── service //service
│ ├── config.ts //project common config
│ ├── constants.ts //project const value
│ └── index.ts //entrance index.js
├── .env //config file
├── ecosystem.config.js //pm2 config
├── ormconfig.json //database ORM config file
├── nodemon.json //nodemon config
├── package.json //npm config
└── tsconfig.json //ts config
```### Table Structure
## Before Start
- MySQL
- RedisRecommended `Docker`.
### Config
### Redis
`.env`
- `PORT_REDIS` Redis port
- `HOST_REDIS` Redis host
- `PASSWORD_REDIS` Redis password### MySQL
`ormconfig.ts`
- `type` DB type
- `host` DB hostRead more: https://github.com/typeorm/typeorm
`src/utils/email.ts`
- `host` Your email provider host.
- `port`Your email provider part.
- `auth`
- `user` Email account, sender by it.
- `pass` Pass token, check your email provider setting.### Database file path
```
./public/mysql.sql
```