1.5.4 • Published 1 year ago

@duplojs/what-was-sent v1.5.4

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

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"
    ],
  }
}
1.5.4

1 year ago

1.4.4

1 year ago

1.3.4

1 year ago

1.3.3

1 year ago

1.3.2

1 year ago

1.2.1

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago