All Projects → grip-framework → Grip

grip-framework / Grip

Licence: mit
The microframework for writing powerful web applications.

Programming Languages

crystal
512 projects

Projects that are alternatives of or similar to Grip

Router
🛣 Simple Navigation for iOS
Stars: ✭ 438 (+219.71%)
Mutual labels:  microframework, router, routing
Clevergo
👅 CleverGo is a lightweight, feature rich and high performance HTTP router for Go.
Stars: ✭ 246 (+79.56%)
Mutual labels:  web-framework, router, routing
Falco
A functional-first toolkit for building brilliant ASP.NET Core applications using F#.
Stars: ✭ 214 (+56.2%)
Mutual labels:  web-framework, router, routing
Drab
Remote controlled frontend framework for Phoenix.
Stars: ✭ 833 (+508.03%)
Mutual labels:  web-framework, phoenix, websocket
Restify Router
A router interface for restify that lets you aggregate route definitions and apply to a restify server
Stars: ✭ 45 (-67.15%)
Mutual labels:  router, routing
Jiny
Lightweight, modern, simple JVM web framework for rapid development in the API era
Stars: ✭ 40 (-70.8%)
Mutual labels:  web-framework, websocket
Router5
Flexible and powerful universal routing solution
Stars: ✭ 1,704 (+1143.8%)
Mutual labels:  router, routing
Jooby
The modular web framework for Java and Kotlin
Stars: ✭ 1,309 (+855.47%)
Mutual labels:  web-framework, microframework
Routing
The Routing component maps an HTTP request to a set of configuration variables.
Stars: ✭ 7,080 (+5067.88%)
Mutual labels:  router, routing
Lit Element Router
A LitElement Router (1278 bytes gzip)
Stars: ✭ 85 (-37.96%)
Mutual labels:  router, routing
Phprouter
PhpRouter is a powerful, minimal, and very fast HTTP URL router for PHP projects
Stars: ✭ 97 (-29.2%)
Mutual labels:  router, routing
Url Mapper
Take a URL and map to functions, parsing params
Stars: ✭ 39 (-71.53%)
Mutual labels:  router, routing
Slipstream
A slick websocket client for Phoenix channels
Stars: ✭ 33 (-75.91%)
Mutual labels:  phoenix, websocket
Corenavigation
📱📲 Navigate between view controllers with ease. 💫 🔜 More stable version (written in Swift 5) coming soon.
Stars: ✭ 69 (-49.64%)
Mutual labels:  router, routing
React Router Component
Declarative router component for React.
Stars: ✭ 879 (+541.61%)
Mutual labels:  router, routing
Literoute
LiteRoute is easy transition for your app. Written on Swift 4
Stars: ✭ 90 (-34.31%)
Mutual labels:  router, routing
Php Router
simple and flexible Router class for PHP. with Controllers and Middlewares support.
Stars: ✭ 111 (-18.98%)
Mutual labels:  router, routing
Cottage
Simple, fast HTTP router on koa.js.
Stars: ✭ 103 (-24.82%)
Mutual labels:  web-framework, router
React Page Layout
Create layouts for react
Stars: ✭ 117 (-14.6%)
Mutual labels:  router, routing
Django Macros Url
Django Macros URL. Routing must be simple as possible
Stars: ✭ 121 (-11.68%)
Mutual labels:  router, routing

The microframework for writing powerful web applications.

Notice: Versions below 4.0.0 are not maintained anymore.

Travis Status Actions Status

TechEmpower Benchmark

Docs CI Status

Chat on Gitter

Grip is a microframework for building RESTful web applications. It is designed to be modular and easy to use, with the ability to scale up to the limits of the Crystal programming language. It offers extensibility and has integrated middleware called "pipes". Pipes can alter parts of the request/response context and then get passed to the actual endpoint. Grip's router is very similar to the router of the Phoenix framework. And most of all: Grip is fast.

Motivation

This project exists due to the fact that Kemal lacks one crucial part of a framework, a structure. An example for the absence of a structure can be found here.

Features

  • HTTP 1.1 support.
  • WebSocket RFC 6455 support.
  • Built-in exceptions support.
  • Parameter handling support.
  • JSON serialization and deserialization support.
  • Built-in middleware support.
  • Request/Response context, inspired by expressjs.
  • Advanced routing support.

Code example

Add this to your application's application.cr:

require "grip"

class IndexController < Grip::Controllers::Http
  def get(context : Context) : Context
    context
      .put_status(200) # Assign the status code to 200 OK.
      .json({"id" => 1}) # Respond with JSON content.
      .halt # Close the connection.
  end

  def index(context : Context) : Context
    id =
      context
        .fetch_path_params
        .["id"]

    # An optional secondary argument gives a custom `Content-Type` header to the response.
    context
      .json(content: {"id" => id}, content_type: "application/json; charset=us-ascii")
  end
end

class Application < Grip::Application
  def routes
    get "/", IndexController
    get "/:id", IndexController, as: :index
  end
end

app = Application.new
app.run

Installation

Add this to your application's shard.yml:

dependencies:
  grip:
    github: grip-framework/grip

And run this command in your terminal:

shards install

API Reference

Documentation can be found on the official website of the Grip framework.

Contribute

See our contribution guidelines and read the code of conduct.

Contributors

Thanks

  • Kemal - Underlying routing, parameter parsing and filtering mechanisms.
  • Amber - Static file handler, ideas and inspiration.
  • Gitter - Technical help, feedback and framework design tips.
  • Crystal - Detailed documentation, examples.
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].