https://github.com/mikro-orm/koa-ts-example-app
Example integration of MikroORM into Koa (in typescript)
https://github.com/mikro-orm/koa-ts-example-app
koa mikro-orm typescript
Last synced: 6 months ago
JSON representation
Example integration of MikroORM into Koa (in typescript)
- Host: GitHub
- URL: https://github.com/mikro-orm/koa-ts-example-app
- Owner: mikro-orm
- Created: 2020-08-09T08:47:59.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-10-29T08:37:21.000Z (6 months ago)
- Last Synced: 2024-10-29T09:53:58.269Z (6 months ago)
- Topics: koa, mikro-orm, typescript
- Language: TypeScript
- Size: 150 KB
- Stars: 17
- Watchers: 3
- Forks: 7
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Koa + SQLite + TypeScript example integration
1. Install dependencies via `yarn` or `npm install`
2. Create DB schema via `npx mikro-orm schema:create -r`
3. Run via `yarn start` or `yarn start:dev` (watch mode)
4. Example API is running on localhost:3000Available routes:
```
GET /author finds all authors
GET /author/:id finds author by id
POST /author creates new author
PUT /author/:id updates author by id
``````
GET /book finds all books
GET /book/:id finds book by id
POST /book creates new book
PUT /book/:id updates book by id
```