All Projects → onyxframework → Http

onyxframework / Http

Licence: mit
An opinionated framework for scalable web 🌎

Programming Languages

crystal
512 projects

Projects that are alternatives of or similar to Http

Tinypart
TinyPart is an iOS modularization framework implemented by Ojective-C. It also supports URL-routing and inter-module communication. TinyPart是一个由Objective-C编写的面向协议的iOS模块化框架,同时它还支持URL路由和模块间通信机制。
Stars: ✭ 120 (-11.76%)
Mutual labels:  framework, modular, router
Komada
Komada: Croatian for `pieces`, is a modular bot system including reloading modules and easy to use custom commands.
Stars: ✭ 67 (-50.74%)
Mutual labels:  framework, modular
Apprun
AppRun is a JavaScript library for developing high-performance and reliable web applications using the elm inspired architecture, events and components.
Stars: ✭ 1,087 (+699.26%)
Mutual labels:  framework, router
Uvicorn Gunicorn Starlette Docker
Docker image with Uvicorn managed by Gunicorn for high-performance Starlette web applications in Python 3.7 and 3.6 with performance auto-tuning. Optionally with Alpine Linux.
Stars: ✭ 92 (-32.35%)
Mutual labels:  framework, websockets
Carrot
🥕 Build multi-device AR applications
Stars: ✭ 32 (-76.47%)
Mutual labels:  framework, websockets
Modularjs
△ Dead simple modular JavaScript framework for ES modules.
Stars: ✭ 52 (-61.76%)
Mutual labels:  framework, modular
Literoute
LiteRoute is easy transition for your app. Written on Swift 4
Stars: ✭ 90 (-33.82%)
Mutual labels:  framework, router
Gf
GoFrame is a modular, powerful, high-performance and enterprise-class application development framework of Golang.
Stars: ✭ 6,501 (+4680.15%)
Mutual labels:  framework, modular
Twig
Twig - less is more's web server for golang
Stars: ✭ 98 (-27.94%)
Mutual labels:  framework, router
Facil.io
Your high performance web application C framework
Stars: ✭ 1,393 (+924.26%)
Mutual labels:  framework, websockets
Nest
A progressive Node.js framework for building efficient, scalable, and enterprise-grade server-side applications on top of TypeScript & JavaScript (ES6, ES7, ES8) 🚀
Stars: ✭ 42,981 (+31503.68%)
Mutual labels:  framework, websockets
Webmiddle
Node.js framework for modular web scraping and data extraction
Stars: ✭ 13 (-90.44%)
Mutual labels:  framework, modular
One
一个极简高性能php框架,支持[swoole | php-fpm ]环境
Stars: ✭ 789 (+480.15%)
Mutual labels:  framework, router
Dragon
⚡A powerful HTTP router and URL matcher for building Deno web servers.
Stars: ✭ 56 (-58.82%)
Mutual labels:  framework, router
Whs.js
🚀 🌪 Super-fast 3D framework for Web Applications 🥇 & Games 🎮. Based on Three.js
Stars: ✭ 5,685 (+4080.15%)
Mutual labels:  framework, modular
Skeleton
A ready-to-use CodeIgniter skeleton with tons of new features and a whole new concept of hooks (actions and filters) as well as a ready-to-use and application-free themes and plugins system. Facebook Page: http://bit.ly/2oHzpxC | Facebook Group: http://bit.ly/2o3KOrA. Help me carry on making more free stuff → http://bit.ly/2ppNujE ←
Stars: ✭ 74 (-45.59%)
Mutual labels:  framework, modular
Zikrouter
Interface-oriented router for discovering modules, and injecting dependencies with protocol in Objective-C and Swift.
Stars: ✭ 516 (+279.41%)
Mutual labels:  modular, router
Gear
A lightweight, composable and high performance web service framework for Go.
Stars: ✭ 544 (+300%)
Mutual labels:  framework, router
Min
A minimalistic web framework with route grouping and middleware chaining
Stars: ✭ 95 (-30.15%)
Mutual labels:  framework, router
Gin
Gin is a HTTP web framework written in Go (Golang). It features a Martini-like API with much better performance -- up to 40 times faster. If you need smashing performance, get yourself some Gin.
Stars: ✭ 53,971 (+39584.56%)
Mutual labels:  framework, router

Onyx::HTTP

Built with Crystal Travis CI build Docs API docs Latest release

An opinionated framework for scalable web.

About 👋

Onyx::HTTP is an opinionated HTTP framework for Crystal language. It features DSL and modules to build modern, scalabale web applications with first-class support for websockets.

Installation 📥

Add these lines to your application's shard.yml:

dependencies:
  onyx:
    github: onyxframework/onyx
    version: ~> 0.6.0
  onyx-http:
    github: onyxframework/http
    version: ~> 0.9.0

This shard follows Semantic Versioning v2.0.0, so check releases and change the version accordingly.

Note that until Crystal is officially released, this shard would be in beta state (0.*.*), with every minor release considered breaking. For example, 0.1.00.2.0 is breaking and 0.1.00.1.1 is not.

Usage 💻

The simplest hello world:

require "onyx/http"

Onyx::HTTP.get "/" do |env|
  env.response << "Hello, world!"
end

Onyx::HTTP.listen

Encapsulated endpoints:

struct GetUser
  include Onyx::HTTP::Endpoint

  params do
    path do
      type id : Int32
    end
  end

  errors do
    type UserNotFound(404)
  end

  def call
    user = Onyx::SQL.query(User.where(id: params.path.id)).first? # This code is part of onyx/sql
    raise UserNotFound.new unless user

    return UserView.new(user)
  end
end

Onyx::HTTP.get "/users/:id", GetUser

Encapsulated views:

struct UserView
  include Onyx::HTTP::View

  def initialize(@user : User)
  end

  json id: @user.id, name: @user.name
end

Websocket channels:

struct Echo
  include Onyx::HTTP::Channel

  def on_message(message)
    socket.send(message)
  end
end

Onyx::HTTP.ws "/", Echo

Documentation 📚

The documentation is available online at docs.onyxframework.org/http.

Community 🍪

There are multiple places to talk about Onyx:

Support ❤️

This shard is maintained by me, Vlad Faust, a passionate developer with years of programming and product experience. I love creating Open-Source and I want to be able to work full-time on Open-Source projects.

I will do my best to answer your questions in the free communication channels above, but if you want prioritized support, then please consider becoming my patron. Your issues will be labeled with your patronage status, and if you have a sponsor tier, then you and your team be able to communicate with me privately in Twist. There are other perks to consider, so please, don't hesistate to check my Patreon page:

You could also help me a lot if you leave a star to this GitHub repository and spread the word about Crystal and Onyx! 📣

Contributing

  1. Fork it ( https://github.com/onyxframework/http/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'feat: some feature') using Angular style commits
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

Licensing

This software is licensed under MIT License.

Open Source Initiative

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].