All Projects → Junker → routy

Junker / routy

Licence: MIT license
Routy is a lightweight high performance HTTP request router for Racket

Programming Languages

racket
414 projects

Projects that are alternatives of or similar to routy

Go Bootstrap
Easy way to bootstrap a web server in Go (Routing|Middleware|Https)
Stars: ✭ 27 (+35%)
Mutual labels:  routing, http-server
Rayo.js
Micro framework for Node.js
Stars: ✭ 170 (+750%)
Mutual labels:  routing, http-server
fastglue
Fastglue is an opinionated, bare bones wrapper that glues together fasthttp and fasthttprouter to act as a micro HTTP framework.
Stars: ✭ 71 (+255%)
Mutual labels:  routing, http-server
sixxsd
sixxsd - The SixXS Daemon - IPv6 Tunnel & Routing Engine
Stars: ✭ 19 (-5%)
Mutual labels:  routing
minimal-http-server
Basic http server
Stars: ✭ 26 (+30%)
Mutual labels:  http-server
routing
Aplus Framework Routing Library
Stars: ✭ 186 (+830%)
Mutual labels:  routing
easyRNRoute
https://medium.com/@kevinle/comprehensive-routing-and-navigation-in-react-native-made-easy-6383e6cdc293#.nttfeeq3p
Stars: ✭ 25 (+25%)
Mutual labels:  routing
extjs-reactjs-examples
Code examples for ExtJS to React transition
Stars: ✭ 48 (+140%)
Mutual labels:  routing
web-benchmarks
A set of HTTP server benchmarks for Golang, node.js and Python with proper CPU utilization and database connection pooling.
Stars: ✭ 22 (+10%)
Mutual labels:  http-server
snunit
Scala Native HTTP server based on NGINX Unit
Stars: ✭ 87 (+335%)
Mutual labels:  http-server
RouteConverter
The popular GPS conversion and editing tool
Stars: ✭ 123 (+515%)
Mutual labels:  routing
polymer-ui-router
UI-router wrapper for Web Components
Stars: ✭ 24 (+20%)
Mutual labels:  routing
craft3-fallback-site
Failing requests in a multi-site install can fall back to other sites, to prevent 404 errors from missing or disabled entries.
Stars: ✭ 14 (-30%)
Mutual labels:  routing
go-import-server
HTTP server for canonical "go get" import path
Stars: ✭ 29 (+45%)
Mutual labels:  http-server
api-router
👨 RESTful router for your API in Nette Framework (@nette). Created either directly or via annotation.
Stars: ✭ 18 (-10%)
Mutual labels:  routing
aqua
A minimal and fast 🏃 web framework for Deno
Stars: ✭ 219 (+995%)
Mutual labels:  http-server
bce.design
minimal magic, minimal tooling, essential dependencies, high productivity, no transpilations and no migrations. The Web Components starter ships with integrated lit-html, redux-toolkit and vaadin router components.
Stars: ✭ 67 (+235%)
Mutual labels:  routing
golgi
A composable routing library for Haxe.
Stars: ✭ 37 (+85%)
Mutual labels:  routing
SQLiteQueryServer
Bulk query SQLite database over the network
Stars: ✭ 48 (+140%)
Mutual labels:  http-server
python-simple-http-server
A super light way HTTP server written by python, support websocket and coroutine.
Stars: ✭ 26 (+30%)
Mutual labels:  http-server

MIT licensed Scribble Docs

Routy

HTTP router for Racket

Routy is a lightweight high performance HTTP request router for Racket.
It uses the same routing syntax as used by popular Ruby web frameworks like Ruby on Rails and Sinatra.

Documentation

Documentation

Usage

(require routy)
(require web-server/servlet)
(require response-ext)

(routy/get "/blog/:name/page/:page" ; eg. "/blog/racket/page/2"
  (lambda (req params)
    (format "blog:~a page:~a" (request/param params 'name) (request/param params 'page))))

(routy/post ...) ; POST request
(routy/put ...) ; PUT request
(routy/delete ...) ; DELETE request
(routy/patch ...) ; PATCH request

;start server
(serve/servlet
    (λ (req) (routy/response req)) ; routy response
    #:launch-browser? #f
    #:servlet-path "/"
    #:port 8000
    #:servlet-regexp #rx"")

with wildcards:

(routy/get "/blog/some*/page/:page" ; eg. "/blog/some-racket/page/2"
  (lambda (req params) 
    (format "page:~a" (request/param params 'page))))

(routy/get "/blog/*/page/:page" ; eg. "/blog/anyname/page/2" 
  (lambda (req params) 
    (format "page:~a" (request/param params 'page))))

(routy/get "/blog/**/page/:page" ; eg. "/blog/racket/super/buper/page/2"
  (lambda (req params) 
    (format "page:~a" (request/param params 'page))))

not found 404 page:

(routy/not-found 
  (lambda (req) 
    "OOPS.. CANNOT FIND THIS PAGE"))

(routy/not-found 
  "OOPS.. CANNOT FIND THIS PAGE")

(routy/not-found 
  (lambda (req)
    (response/make #:code 200 "SOME TEXT")))

serve files:

(routy/files "/plain-docs" #:root "/var/www/my-site") ; eg. "/plain-docs/boring-doc.html"

with params constraints:

(routy/get "/blog/:name/page/:page" #:constraints '((name #px"\\w+") (page #px"\\d+")) ; eg. "/blog/racket/page/2", but not "/blog/10/page/two"
  (lambda (req params) 
    (format "blog:~a page:~a" (request/param params 'name) (request/param params 'page))))
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].