All Projects → icyleaf → salt

icyleaf / salt

Licence: MIT license
**Unmaintained** A Human Friendly Interface for HTTP server written in Crystal.

Programming Languages

crystal
512 projects
HTML
75241 projects

Projects that are alternatives of or similar to salt

rpi-nginx
[DEPRECATED] NGINX on Raspberry Pi / ARM
Stars: ✭ 20 (+5.26%)
Mutual labels:  webserver
natural
Fastest Framework for NodeJS. Written in pure ES6+
Stars: ✭ 30 (+57.89%)
Mutual labels:  webserver
toh
TCP over HTTP. 隐藏网站的管理服务
Stars: ✭ 36 (+89.47%)
Mutual labels:  webserver
bookish spork
Erlang library for testing http requests
Stars: ✭ 82 (+331.58%)
Mutual labels:  webserver
Kitura-HelloWorld-iOS
A Hello World example of running Kitura on iOS
Stars: ✭ 55 (+189.47%)
Mutual labels:  webserver
MemoBoard
Flask and React based intranet app where you can create and share lists (e.g. shopping list, todo, ...)
Stars: ✭ 35 (+84.21%)
Mutual labels:  webserver
heartbeat
A service to keep a live heartbeat (ping) on multiple devices
Stars: ✭ 27 (+42.11%)
Mutual labels:  webserver
docker-apache-letsencrypt
This docker-image contains a simple Apache webserver and supports https-encryption by great Let's Encrypt certificates!
Stars: ✭ 65 (+242.11%)
Mutual labels:  webserver
WebListener
A simple, lightweight, PowerShell-based web server, designed for small, temporary projects.
Stars: ✭ 29 (+52.63%)
Mutual labels:  webserver
cordova-plugin-webserver
A webserver plugin for cordova
Stars: ✭ 101 (+431.58%)
Mutual labels:  webserver
ruby wolf
Tiny ruby web server for research and studying purpose
Stars: ✭ 19 (+0%)
Mutual labels:  webserver
internetarchivebot
iabot.toolforge.org
Stars: ✭ 67 (+252.63%)
Mutual labels:  webserver
django-boilerplate-3.6.1
Django served by Gunicorn running behind Nginx reverse proxy. Deploy to AWS Elastic Beanstalk with Fabric3!
Stars: ✭ 13 (-31.58%)
Mutual labels:  webserver
Teapot
Teapot micro web framework for Pharo Smalltalk
Stars: ✭ 86 (+352.63%)
Mutual labels:  webserver
simplewebserver
SimpleWebServer 是一款使用Java基于NIO编写的超轻量级开源Web Application Server
Stars: ✭ 67 (+252.63%)
Mutual labels:  webserver
phpkoa
PHP异步编程: 基于 PHP 实(chao)现(xi) NODEJS web框架 KOA。
Stars: ✭ 52 (+173.68%)
Mutual labels:  webserver
rust-web-boilerplate
An implementation of a simple web server using Rust
Stars: ✭ 36 (+89.47%)
Mutual labels:  webserver
pLannotate
Webserver and command line tool for annotating engineered plasmids
Stars: ✭ 32 (+68.42%)
Mutual labels:  webserver
ESPxWebFlMgr
Manage your ESP8266/ESP32 SPIFFS/LittleFS files with a simple web based interface
Stars: ✭ 33 (+73.68%)
Mutual labels:  webserver
irc-tts
Broadcast your IRC channel via a text-to-speech webserver
Stars: ✭ 14 (-26.32%)
Mutual labels:  webserver

salt icon

A Human Friendly Interface for HTTP webservers written in Crystal.

Project Status Langugea License

"Salt" icon by Creative Stall from Noun Project.

Installation

Add this to your application's shard.yml:

dependencies:
  salt:
    github: icyleaf/salt
    branch: master

Usage

require "salt"
require "salt/middlewares/session/cookie"
require "salt/middlewares/logger"

class Talk < Salt::App
  def call(env)
    env.session.set("username", "icyleaf")
    env.logger.info("Start Talking!")
    {400, { "Content-Type" => "text/plain" }, ["Can I talk to salt?"]}
  end
end

class Shout < Salt::App
  def call(env)
    call_app(env)

    env.logger.debug("Shout class")
    {status_code, headers, body.map &.upcase }
  end
end

class Speaking < Salt::App
  def call(env)
    call_app(env)

    env.logger.debug("Speaking class")
    {200, headers, ["This is Slat speaking! #{env.session.get("username")}"]}
  end
end

Salt.use Salt::Session::Cookie, secret: "<change me>"
Salt.use Salt::Logger, level: Logger::DEBUG, progname: "app"
Salt.use Shout
Salt.use Speaking

Salt.run Talk.new

Available middleware

  • ShowExceptions
  • CommonLogger
  • Logger
  • Runtime
  • Session (Cookie/Redis)
  • Head
  • File
  • Directory
  • Static
  • SendFile
  • ETag
  • BasicAuth
  • Router (lightweight)

All these components use the same interface, which is described in detail in the Salt::App specification. These optional components can be used in any way you wish.

How to Contribute

Your contributions are always welcome! Please submit a pull request or create an issue to add a new question, bug or feature to the list.

All Contributors are on the wall.

You may also like

  • halite - HTTP Requests Client with a chainable REST API, built-in sessions and loggers.
  • totem - Load and parse a configuration file or string in JSON, YAML, dotenv formats.
  • markd - Yet another markdown parser built for speed, Compliant to CommonMark specification.
  • poncho - A .env parser/loader improved for performance.
  • popcorn - Easy and Safe casting from one type to another.
  • fast-crystal - 💨 Writing Fast Crystal 😍 -- Collect Common Crystal idioms.

Resouces

Heavily inspired from Ruby's rack gem.

License

MIT License © icyleaf

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