Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/albertsmit/marlin
A Nim port of Lukeed's Trouter 🐟.
https://github.com/albertsmit/marlin
lukeed nim router trouter
Last synced: about 1 month ago
JSON representation
A Nim port of Lukeed's Trouter 🐟.
- Host: GitHub
- URL: https://github.com/albertsmit/marlin
- Owner: AlbertSmit
- License: mit
- Created: 2021-07-18T16:48:43.000Z (over 3 years ago)
- Default Branch: develop
- Last Pushed: 2021-08-01T18:53:40.000Z (over 3 years ago)
- Last Synced: 2024-11-07T20:08:08.786Z (3 months ago)
- Topics: lukeed, nim, router, trouter
- Language: Nim
- Homepage:
- Size: 85.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
![Language: Nim](https://img.shields.io/static/v1?label=written%20with%20love,%20in&message=Nim&color=yellow)
![License: MIT](https://img.shields.io/github/license/AlbertSmit/Marlin)
[![Version](https://img.shields.io/github/v/release/AlbertSmit/Marlin?include_prereleases)](https://github.com/AlbertSmit/Marlin/releases)# Marlin 🦈
> Marlins are among the fastest marine swimmers [` 1 `](#footnote)
> ...greatly exaggerated speeds are often claimed in popular literature [` 1 `](#footnote)
**`1`** — Source: [Wikipedia](https://en.wikipedia.org/wiki/Marlin)
## What the fish is this?
**A [Nim](https://github.com/nim-lang/Nim) port of [Lukeed](https://github.com/lukeed)'s [Trouter 🐟](https://github.com/lukeed/regexparam).**
> 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
```nim
import marlin, std/with, sugarwith 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](https://github.com/lukeed)'s `RegexParams`.