Installation
Install the TypeORM integration package along with its required dependencies:You’ll also need to install the core
@nestjsx/crud package if you haven’t already. See the CRUD installation guide.Required Dependencies
TypeORM Dependencies
The package requires:- @nestjs/typeorm - NestJS integration for TypeORM
- typeorm - The TypeORM library itself
Database Driver
You’ll also need to install a database driver for your chosen database:TypeORM Setup
Before using the CRUD package, configure TypeORM in your application:1. Configure TypeORM Module
2. Create an Entity
3. Create a Service
4. Create a Controller
5. Register in Module
Verification
To verify the installation:- Start your application
- The TypeORM connection should be established
- Your CRUD endpoints should be available
Advanced Configuration
Custom Repository
You can use custom TypeORM repositories:Soft Deletes
Enable soft deletes on your entity:Next Steps
Request Package
Learn about request query building
Quick Start
Build a complete CRUD API
Troubleshooting
Connection Issues
If you’re having trouble connecting to the database:- Verify your database credentials
- Ensure the database server is running
- Check firewall settings
- Verify the database driver is installed
Entity Not Found
If TypeORM can’t find your entities:- Check the
entitiespath in TypeORM configuration - Ensure entities are exported properly
- Verify the file naming convention matches the pattern