1.3.5 • Published 1 year ago

@duxcore/manifestation v1.3.5

Weekly downloads
-
License
GPL-3.0
Repository
github
Last release
1 year ago

This is a very lightweight manifestation library that is designed to make it easier to create Express.js APIs. Simply create a manifestation object, create an API server using the manifestation object and then enjoy your new manifested API server.

Example Code

import { manifestation, ApiManifest } from "@duxcore/manifestation";


const teapot = manifestation.newRoute({
  route: "/teapot",
  method: "all",
  executor: (req, res) => {
    const response = manifestation.newApiResponse({
      status: 418,
      message: "I'm not a teapot",
      successful: true
    });

    manifestation.sendApiResponse(res, response);
  }
})

/**
 * Example Manifest
 * 
 * This manifest has two routes with no middleware.
 * 
 * /teapot
 * /v1/teapot
 */
const manifest = manifestation.newManifest({
  routes: [teapot],
  versions: [
    {
      version: 1,
      routes: [teapot],
      routers: [
        {
          route: "/demoRouter",
          routes: [teapot]
        }
      ]
    }
  ],
  routers: [
    {
      route: "/demoRouter",
      routes: [teapot]
    }
  ]
})

manifestation.createServer(manifest, {}).listen(2020, () => { console.log("started") });
1.3.5

1 year ago

1.3.4

1 year ago

1.3.3

1 year ago

1.3.2

1 year ago

1.3.1

1 year ago

1.3.0

1 year ago

1.2.4

2 years ago

1.2.0

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.1.0

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago