anatomic-restana

0.5.0 • Public • Published

anatomic-restana

An anatomic component for restana.

tl;dr

const anatomic = require("anatomic");
const { app, server } = require("anatomic-restana");

const router = {
  start({ app }) {
    app.get("*", (req, res) => res.send("Hello!"))
  }
};

const system = anatomic()
  .add('app', app())
  .add('server', server()).dependsOn("app", "config", "router")
  .add("router", router).dependsOn("app")
  .configure({ server: { port: 8080 } });

system.start();

And then do

curl http://localhost:8080/pizza

Readme

Keywords

none

Package Sidebar

Install

npm i anatomic-restana

Weekly Downloads

5

Version

0.5.0

License

ISC

Unpacked Size

5.27 kB

Total Files

6

Last publish

Collaborators

  • add1ed