Created
August 19, 2018 10:47
-
-
Save kerren/78e6abdb6cc851895fbd862dc27d261d to your computer and use it in GitHub Desktop.
The user service for Nest.js - https://blog.entrostat.com/setting-up-a-database-module-in-nest-js/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Injectable } from '@nestjs/common'; | |
import { InjectRepository } from '@nestjs/typeorm'; | |
import { User } from 'modules/shared/entities/user.entity'; | |
import { Repository } from 'typeorm'; | |
@Injectable() | |
export class UserService { | |
constructor( | |
@InjectRepository(User) | |
private readonly userRepository: Repository<User> | |
) { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment