2.0.7 • Published 1 year ago

flummpress v2.0.7

Weekly downloads
6
License
MIT
Repository
-
Last release
1 year ago

flummpress

Usage Example

import path from "path";
import flummpress, { router, views } from "flummpress";

(async () => {
  const port = 8080;
  (await new flummpress())
    .listen(port)
    .on("listening", () => {
      console.log(`flummpress is listening on port ${port}`);

      // new route GET
      router.get(/^\/$/, (req, res) => {
        res.reply({
          body: "hello world!"
        });
      });

      // new route POST
      router.post(/^\/$/, async (req, res) => {
        const postdata = await req.post;
        console.log(postdata);
        res.reply({
          body: "hello post!"
        });
      });

      // public folder
      router.static({
        dir: path.resolve() + "/public",
        route: /^\/public/
      });
    });
})();

documentation

coming soon

2.0.7

1 year ago

2.0.6

1 year ago

2.0.5

2 years ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.4

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago