Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <title>Tweet Box</title> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| </head> |
This file contains hidden or 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
| nest new auth-nestjs && cd auth-nestjs |
This file contains hidden or 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
| nest g module auth |
This file contains hidden or 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 { Module } from '@nestjs/common'; | |
| @Module({}) | |
| export class AuthModule {} |
This file contains hidden or 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 { Module } from '@nestjs/common'; | |
| import { AppController } from './app.controller'; | |
| import { AppService } from './app.service'; | |
| import { AuthModule } from './auth/auth.module'; | |
| @Module({ | |
| imports: [AuthModule], | |
| controllers: [AppController], | |
| providers: [AppService], | |
| }) |
This file contains hidden or 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
| nest g controller auth && nest g service auth |
This file contains hidden or 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
| npm i @nestjs/typeorm typeorm pg |
This file contains hidden or 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 { TypeOrmModuleOptions } from '@nestjs/typeorm'; | |
| export const typeOrmConfig: TypeOrmModuleOptions = { | |
| type: 'postgres', | |
| host: 'localhost', | |
| port: 5432, | |
| username: 'postgres', | |
| password: 'postgres', | |
| database: 'authuser', | |
| entities: [__dirname + '/../**/*.entity{.ts,.js}'], |
This file contains hidden or 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 { Module } from '@nestjs/common'; | |
| import { AppController } from './app.controller'; | |
| import { AppService } from './app.service'; | |
| import { AuthModule } from './auth/auth.module'; | |
| import { TypeOrmModule } from '@nestjs/typeorm'; | |
| import { typeOrmConfig } from './config/typeorm.config'; | |
| @Module({ | |
| // Updated imports to finailize configuration | |
| imports: [TypeOrmModule.forRoot(typeOrmConfig), AuthModule], |
OlderNewer