@duplojs/http-exception
TypeScript icon, indicating that this package has built-in type declarations

1.1.4 • Public • Published

duplojs-http-exception

NPM version

Instalation

npm i @duplojs/http-exception

Implémentation

import Duplo from "@duplojs/duplojs";
import duploHttpException, {OkHttpException} from "@duplojs/http-exception";

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

duplo.declareRoute("GET", "/")
.handler(() => {
    throw new OkHttpException("successful", "hello-world");
});

duplo.launch();

Implémentation globales

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

tsconfig.json

{
  "compilerOptions": {
    ...
    "types": [
        "@duplojs/http-exception/globals"
    ],
  }
}

Readme

Keywords

none

Package Sidebar

Install

npm i @duplojs/http-exception

Weekly Downloads

153

Version

1.1.4

License

ISC

Unpacked Size

47.8 kB

Total Files

8

Last publish

Collaborators

  • mathcovax