Building pixel perfect apps for 1 billion people. Areas: social network, delivery, finance, logistics.
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 { PrismaService } from "./prisma.service"; | |
| @Module({ | |
| providers: [PrismaService], | |
| exports: [PrismaService] | |
| }) | |
| export class PrismaModule {} |
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 { APILogger } from '../logger/api.logger'; | |
| import { TaskService } from '../service/task.service'; | |
| export class TaskController { | |
| private taskService: TaskService; | |
| private logger: APILogger; | |
| constructor() { | |
| this.taskService = new TaskService(); |
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 { INestApplication } from '@nestjs/common' | |
| import { NestFactory } from '@nestjs/core' | |
| import { App } from './app' | |
| setImmediate(async (): Promise<void> => { | |
| const app = await NestFactory.create<INestApplication>(App, { | |
| cors: true, | |
| }) | |
| await app.listen(3000) |
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
| const Fetch = async(SQL, ...params) => { | |
| try { | |
| const client = await pool.connect() | |
| const { rows } = await client.query(SQL,params.length ? params : null) | |
| return rows | |
| } finally { | |
| client.release() | |
| } | |
| } |