All Projects → CrowdHailer → Ace

CrowdHailer / Ace

Licence: mit
HTTP web server and client, supports http1 and http2

Programming Languages

elixir
2628 projects
erlang
1774 projects

Projects that are alternatives of or similar to Ace

Shgf
Simple HTTP golang framework
Stars: ✭ 13 (-95.59%)
Mutual labels:  http2, https, tls
Jetty.project
Eclipse Jetty® - Web Container & Clients - supports HTTP/2, HTTP/1.1, HTTP/1.0, websocket, servlets, and more
Stars: ✭ 3,260 (+1005.08%)
Mutual labels:  http2, https, tls
tipi
Tipi - the All-in-one Web Server for Ruby Apps
Stars: ✭ 214 (-27.46%)
Mutual labels:  tls, https, http2
Blinksocks
A framework for building composable proxy protocol stack.
Stars: ✭ 587 (+98.98%)
Mutual labels:  http2, https, tls
Ymhttp
基于 libcurl 的 IO 多路复用 HTTP 框架,适用于 iOS 平台,支持 HTTP/HTTPS/HTTP2/DNS(SNI)
Stars: ✭ 127 (-56.95%)
Mutual labels:  http2, https, tls
Siris
DEPRECATED: The community driven fork of Iris. The fastest web framework for Golang!
Stars: ✭ 146 (-50.51%)
Mutual labels:  http2, https, tls
cryptonice
CryptoNice is both a command line tool and library which provides the ability to scan and report on the configuration of SSL/TLS for your internet or internal facing web services. Built using the sslyze API and ssl, http-client and dns libraries, cryptonice collects data on a given domain and performs a series of tests to check TLS configuration…
Stars: ✭ 91 (-69.15%)
Mutual labels:  tls, https, http2
TLS-Redirection
TLS Redirection
Stars: ✭ 109 (-63.05%)
Mutual labels:  tls, https
lolhttp
An HTTP Server and Client library for Scala.
Stars: ✭ 93 (-68.47%)
Mutual labels:  https, http2
nativescript-http
The best way to do HTTP requests in NativeScript, a drop-in replacement for the core HTTP with important improvements and additions like proper connection pooling, form data support and certificate pinning
Stars: ✭ 32 (-89.15%)
Mutual labels:  tls, http2
gost
GO Simple Tunnel - a simple tunnel written in golang
Stars: ✭ 154 (-47.8%)
Mutual labels:  https, http2
restler
Restler is a beautiful and powerful Android app for quickly testing REST API anywhere and anytime.
Stars: ✭ 120 (-59.32%)
Mutual labels:  https, http2
sslcontext-kickstart
🔐 A lightweight high level library for configuring a http client or server based on SSLContext or other properties such as TrustManager, KeyManager or Trusted Certificates to communicate over SSL TLS for one way authentication or two way authentication provided by the SSLFactory. Support for Java, Scala and Kotlin based clients with examples. Av…
Stars: ✭ 295 (+0%)
Mutual labels:  tls, https
ssltun
simple secure http proxy server with automic https
Stars: ✭ 33 (-88.81%)
Mutual labels:  tls, http2
tlstools
🔐 CLI tool to analyze, troubleshoot or inspect SSL certificates, requests or keys.
Stars: ✭ 45 (-84.75%)
Mutual labels:  tls, https
HAProxy-2-RPM-builder
Build latest HAProxy binary with prometheus metrics support
Stars: ✭ 28 (-90.51%)
Mutual labels:  https, http2
3dub
www dev server with livereload, file watching, http2, https, self signed cert generation
Stars: ✭ 28 (-90.51%)
Mutual labels:  https, http2
concerto
A command line tool and a library to generate TLS certificates for development purposes.
Stars: ✭ 34 (-88.47%)
Mutual labels:  tls, https
gost
GO Simple Tunnel - a simple tunnel written in golang
Stars: ✭ 8,395 (+2745.76%)
Mutual labels:  tls, http2
letsencrypt-www
Probably the easiest way to create | renew | deploy certificate
Stars: ✭ 27 (-90.85%)
Mutual labels:  tls, https

Ace

HTTP web server and client, supports http1 and http2

Hex pm Build Status License

See Raxx.Kit for a project generator that helps you set up a web project based on Raxx/Ace.

Get started

Hello, World!

defmodule MyApp do
  use Ace.HTTP.Service, port: 8080, cleartext: true
  use Raxx.SimpleServer

  @impl Raxx.SimpleServer
  def handle_request(%{method: :GET, path: []}, %{greeting: greeting}) do
    response(:ok)
    |> set_header("content-type", "text/plain")
    |> set_body("#{greeting}, World!")
  end
end

The arguments given to use Ace.HTTP.Service are default values when starting the service.

Start the service

config = %{greeting: "Hello"}

MyApp.start_link(config, port: 1234)

Here the default port value has been overridden at startup

Raxx

Ace implements the Raxx HTTP interface. This allows applications to be built with any components from the Raxx ecosystem.

Raxx has tooling for streaming, server-push, routing, api documentation and more. See documentation for details.

The correct version of raxx is included with ace, raxx does not need to be added as a dependency.

TLS/SSL

If a service is started without the cleartext it will start using TLS. This requires a certificate and key.

config = %{greeting: "Hello"}
options = [port: 8443, certfile: "path/to/certificate", keyfile: "path/to/key"]

MyApp.start_link(application, options)

TLS is required to serve content via HTTP/2.

Supervising services

The normal way to run services is as part of a projects supervision tree. When starting a new project use the --sup flag.

mix new my_app --sup

Add the services to be supervised in the application file lib/my_app/application.ex.

defmodule MyApp.Application do
  @moduledoc false

  use Application

  def start(_type, _args) do
    import Supervisor.Spec, warn: false

    children = [
      {MyApp, [%{greeting: "Hello"}]}
    ]

    opts = [strategy: :one_for_one, name: MyApp.Supervisor]
    Supervisor.start_link(children, opts)
  end
end

Start project using iex -S mix and visit http://localhost:8080.

Testing

mix test --include ci:true

Will run h2spec as one of the tests.

If the h2spec is not specified in the environment variable $H2SPEC_PATH or on the $PATH, it will be downloaded into test/support/h2spec/ and executed.

Alternative HTTP servers

Other servers you can use for Elixir/erlang applications are Cowboy and Elli.

Of the three Cowboy is the most widely used. Both Elli and Cowboy are written in erlang, Ace is written in Elixir.

Elixir HTTP Benchmark - Ace vs Cowboy

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