Skip to content

Latest commit

 

History

History
36 lines (27 loc) · 470 Bytes

README.md

File metadata and controls

36 lines (27 loc) · 470 Bytes

Hexagonal Architecture boilerplate

Installation

pnpm i @carbonteq/hexapp
npm i @carbonteq/hexapp
yarn add @carbonteq/hexapp

Usage

Entity Declaration

import { BaseEntity } from "@carbonteq/hexapp/domain/base.entity.js";

class User extends BaseEntity {
  constructor(readonly name: string) {
    super();
  }

  serialize() {
    return {
      ...super._serialize(),
      name: this.name,
    };
  }
}