AlbertSmit / Marlin

A Nim port of Lukeed's Trouter 🐟.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Language: Nim License: MIT Version

Marlin 🦈

Marlins are among the fastest marine swimmers 1

...greatly exaggerated speeds are often claimed in popular literature 1

1 β€” Source: Wikipedia

What the fish is this?

A Nim port of Lukeed's Trouter 🐟.

Long story short; it's a router.

Writing this port to

  • understand the inner workings
  • get better at writing libraries
  • have a shiny new router to work with

Work in progress.

Usage

import marlin, std/with, sugar

with marlin.router:
  get "/pizza", () => "pizza is ready!"
  get "/hamburger", () => "who ordered a hamburger?"
  get "/songs/:artist/reviews/:song?", () => "bruh"
  post "/songs/:artist/:album", () => "mister postman."

Submodules

  • src/regex β†’ Nim port of Lukeed's RegexParams.

About

A Nim port of Lukeed's Trouter 🐟.

License:MIT License


Languages

Language:Nim 100.0%