Skip to content

Instantly share code, notes, and snippets.

View Googluu's full-sized avatar
🦊
Focusing

Sneyder Rodríguez Googluu

🦊
Focusing
View GitHub Profile
@Klerith
Klerith / password-property-dto.ts
Created July 16, 2022 16:32
Password validation - DTO
@IsString()
@MinLength(6)
@MaxLength(50)
@Matches(
/(?:(?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/, {
message: 'The password must have a Uppercase, lowercase letter and a number'
})
password: string;
@Klerith
Klerith / seed.ts
Created July 12, 2022 18:55
Nest-Teslo Seed
interface SeedProduct {
description: string;
images: string[];
stock: number;
price: number;
sizes: ValidSizes[];
slug: string;
tags: string[];
title: string;
type: ValidTypes;
@Klerith
Klerith / Dockerfile
Last active May 5, 2024 02:58
Preparar imagen de Docker - Node App
# Install dependencies only when needed
FROM node:18-alpine3.15 AS deps
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile
# Build the app with cache dependencies
FROM node:18-alpine3.15 AS builder
@Klerith
Klerith / README.md
Last active April 21, 2024 18:22
Deprecated Method - Decorador

@Deprecated - Method Decorator

En la definición del método, se puede marcar como obsoleto (deprecated) con la justificación. Esto ayudará a que otros developers sepán que deben de utilizar ya la alternativa.

@Deprecated('Most use speak2 method instead')
 speak() {
      console.log(`${ this.name }, ${ this.name }!`)
 }
@Klerith
Klerith / instalaciones-nestjs.md
Last active April 30, 2024 19:13
Instalaciones recomendadas para el curso de Nest.js
@Klerith
Klerith / instalaciones-node.md
Created January 26, 2021 22:39
Instalaciones recomendadas y obligatorias para seguir el curso de Node