https://github.com/mikro-orm/nestjs-example-app
https://github.com/mikro-orm/nestjs-example-app
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mikro-orm/nestjs-example-app
- Owner: mikro-orm
- Created: 2019-11-15T17:01:03.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2025-03-28T15:28:00.000Z (9 months ago)
- Last Synced: 2025-03-30T00:10:05.867Z (9 months ago)
- Language: TypeScript
- Size: 928 KB
- Stars: 83
- Watchers: 3
- Forks: 32
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# Nest + MySQL + TypeScript example integration
1. Install dependencies via `yarn` or `npm install`
2. Run `docker-compose up -d` to start mysql
3. Create database schema via `npx mikro-orm schema:create -r`. This will also create the
database if it does not exist.
4. Run via `yarn start` or `yarn start:dev` (nodemon)
5. Example API is running on http://localhost:3000
Available 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
```