GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Zaubrik/composium: Create handlers for Deno.serve. Powered by functional composition and the URL Pattern API.

BranchesTags
Open more actions menu

Latest commit

 

History

89 Commits
89 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
url-pattern
url-pattern
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
composition.ts
composition.ts
 
 
composition_test.ts
composition_test.ts
 
 
context.ts
context.ts
 
 
deno.json
deno.json
 
 
example.ts
example.ts
 
 
handler.ts
handler.ts
 
 
handler_test.ts
handler_test.ts
 
 
mod.ts
mod.ts
 
 
route.ts
route.ts
 
 
route_test.ts
route_test.ts
 
 
test_deps.ts
test_deps.ts
 
 
test_util.ts
test_util.ts
 
 

Repository files navigation

composium

Powered by functional composition and the URL Pattern API, composium has become the most flexible routing framework in the world. Through its composability it can serve perfectly as a generic, abstract and minimal layer for your own back-end framework.

URL Pattern

The best way to learn and test the URL Pattern API is Zaubrik's free URL Pattern User Interface.

Documentation

deno doc https://deno.land/x/composium/mod.ts

Example

import { Context, createDefaultHandler, createGetRoute } from "./mod.ts";

function welcome<C extends Context>(ctx: C) {
  const name = ctx.result.pathname.groups.name || "nobody";
  ctx.response = new Response(`Welcome, ${name}!`);
  return ctx;
}

const route = createGetRoute({ pathname: "/{:name}?" })(welcome);
const handler = createDefaultHandler(route);

Deno.serve(handler);

// curl http://localhost:8080/Joe
// Welcome, Joe!

Discord

Feel free to ask questions and start discussions in our discord server.

About

Create handlers for Deno.serve. Powered by functional composition and the URL Pattern API.

dev.zaubrik.com/url-pattern

Topics

composedenofunctional-programmingrouterserverurlpattern

Resources

Readme
MIT license
Activity
Custom properties

Stars

6 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.