Packages
ace
0.2.0
0.19.0
0.18.10
0.18.9
0.18.8
0.18.7
0.18.6
0.18.5
0.18.4
0.18.3
0.18.2
0.18.1
0.18.0
0.17.1
0.17.0
0.16.8
0.16.7
0.16.6
0.16.5
0.16.4
0.16.3
0.16.2
0.16.1
0.16.0
0.15.11
0.15.10
0.15.9
0.15.8
0.15.7
0.15.6
retired
0.15.5
0.15.4
0.15.3
0.15.2
0.15.1
0.15.0
0.14.8
0.14.7
0.14.6
0.14.5
0.14.4
0.14.3
0.14.2
0.14.1
0.14.0
0.13.1
0.13.0
0.12.1
0.12.0
retired
0.11.1
0.11.0
0.10.0
0.9.3
0.9.2
0.9.1
0.9.0
0.8.1
0.8.0
0.7.1
0.7.0
0.6.3
0.6.2
0.6.1
0.6.0
0.5.2
0.5.1
0.5.0
0.4.0
0.3.0
0.2.0
HTTP web server and client, supports http1 and http2
Current section
Files
Jump to
Current section
Files
README.md
# Ace
### An educational Webserver for Elixir.
# Hi
> If you are hear send me a message twitter/gh-issue, they're all good.
> I want to take a deep dive into TCP/HTTP and network protocols in general, so if your curious or on a similar voyage of discovery say hi.
> Cheers
## Installation
[Available on Hex](https://hex.pm/packages/ace), the package can be installed as:
1. Add `ace` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[{:ace, "~> 0.2.0"}]
end
```
## Usage
#### startup
From the console, start mix.
```shell
iex -S mix
```
In the `iex` console, start a TCP server.
```elixir
Ace.TCP.start(8080)
```
#### Connect
Use telnet to communicate with the echo server.
```
telnet localhost 8080
hi
ECHO: hi
```
## The plan
1. To take this obviously deficient TCP echo server that I wrote as a beginner elixir developer and create a fully fledged HTTP server.
2. Keep reasonable notes of progress so others can learn about how to build a web server in elixir.
3. See what progress I have made in a year as an elixir developer.
### Ace 0.1 (TCP echo)
The simplest TCP echo server that works.
Checkout the source of [version 0.1.0](https://github.com/CrowdHailer/Ace/blob/0.1.0/server.ex).
The [change log](https://github.com/CrowdHailer/Ace/blob/master/CHANGELOG.md) documents all enhancements to this prototype server.
## Using Vagrant
Vagrant manages virtual machine provisioning.
Using Vagrant allows you to quickly get started with `Ace` without needing to install Elixir/erlang on you machine.
*If you do not know vagrant on you machine I would suggest just installing elixir on your host machine and ignoring the instructions here.*
```
vagrant up
vagrant ssh
cd /vagrant
```
From this directory instructions will be that same as users running Elixir on their machine.
## Resources I used to get this far
- https://github.com/adamgamble/elixir_http_server
- https://github.com/tominated/elixir_http_server
- https://github.com/parroty/http_server
- http://www.neo.com/2014/01/14/elixir-and-the-internet-of-things-handling-a-stampede