Skip to content
This repository has been archived by the owner on Oct 20, 2024. It is now read-only.

duplojs/duplojs-what-was-sent

Repository files navigation

duplojs-what-was-sent

NPM version

Instalation

npm i @duplojs/what-was-sent

Implémentation

import Duplo, {zod} from "@duplojs/duplojs";
import duploWhatWasSent, {IHaveSentThis} from "@duplojs/what-was-sent";

const duplo = Duplo({port: 1506, host: "localhost", environment: "DEV"});

duplo.use(duploWhatWasSent, {
    enabled: duplo.config.environment ===  "DEV"
});

duplo.declareRoute("GET", "/test/1")
.handler(
    ({}, res) => {
        res.code(200).send(100);
    },
    new IHaveSentThis(200, zod.string()) 
);

duplo.launch();

Implémentation globales

duplo.use(duploWhatWasSent, {
    ...
    globals: true
});

tsconfig.json

{
  "compilerOptions": {
    ...
    "types": [
        "@duplojs/what-was-sent/globals"
    ],
  }
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published