Skip to content

Instantly share code, notes, and snippets.

View akiraTatesawa's full-sized avatar
🎯
Focusing

Arthur Akira akiraTatesawa

🎯
Focusing
  • Guarulhos - SP
View GitHub Profile
@akiraTatesawa
akiraTatesawa / base-controller.ts
Created February 28, 2023 13:15
Exemplo de um BaseController utilizando Express
import * as express from "express";
import httpStatus from "http-status";
import { APIError } from "./api-error";
export abstract class BaseController {
// Success Methods
protected ok<DTO>(res: express.Response, dto?: DTO) {
if (dto) {
return res.status(httpStatus.OK).json(dto);
}

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example