• This repository has been archived on 05/Sep/2019
  • Stars
    star
    133
  • Rank 264,075 (Top 6 %)
  • Language
    Julia
  • License
    MIT License
  • Created about 11 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

DEPRECATED! Basic, non-blocking HTTP server in Julia.

This project is deprecated. Please use HTTP.jl

HttpServer.jl

Build Status codecov.io

HttpServer HttpServer HttpServer HttpServer

This is a basic, non-blocking HTTP server in Julia.

You can write a basic application using just this if you're happy dealing with values representing HTTP requests and responses directly. For a higher-level view, you could use Mux. If you'd like to use WebSockets as well, you'll need to grab WebSockets.jl.

Installation

Use Julia package manager to install this package as follows:

Pkg.add("HttpServer")

Functionality

  • binds to any address and port
  • supports IPv4 & IPv6 addresses
  • supports HTTP, HTTPS and Unix socket transports

You can find many examples of how to use this package in the examples folder.

Example

using HttpServer

http = HttpHandler() do req::Request, res::Response
    Response( ismatch(r"^/hello/",req.resource) ? string("Hello ", split(req.resource,'/')[3], "!") : 404 )
end

server = Server( http )
run( server, 8000 )
# or
run(server, host=IPv4(127,0,0,1), port=8000)

If you open up localhost:8000/hello/name/ in your browser, you should get a greeting from the server.


:::::::::::::
::         ::
:: Made at ::
::         ::
:::::::::::::
     ::
Hacker School
:::::::::::::

More Repositories

1

HTTP.jl

HTTP for Julia
Julia
624
star
2

Mux.jl

Middleware for Julia
Julia
273
star
3

JuliaWebAPI.jl

Julia package for deploying APIs
Julia
188
star
4

GitHub.jl

A Julia package for interfacing with GitHub
Julia
169
star
5

WebSockets.jl

A WebSockets library for Julia
Julia
156
star
6

Gumbo.jl

Julia wrapper around Google's gumbo C library for parsing HTML
Julia
151
star
7

Requests.jl

[DEPRECATED in favor of https://github.com/JuliaWeb/HTTP.jl] HTTP for Julians
Julia
120
star
8

Hyperscript.jl

Hyperscript: A lightweight DOM representation for Julia
Julia
94
star
9

LibCURL.jl

Julia wrapper for libcurl
Julia
33
star
10

HttpCommon.jl

Types and helper functions for dealing with the HTTP in Julia
Julia
31
star
11

GeoIP.jl

A Julia package to estimate the geographic location of IP addresses
Julia
25
star
12

URIs.jl

URI parsing in Julia
Julia
25
star
13

Retry.jl

Macros for simplified exception handling: @repeat try, @retry, @delay_retry, @protected try, @ignore.
Julia
25
star
14

HTTPClient.jl

DEPRECATED, USE HTTP.jl INSTEAD
Julia
17
star
15

URIParser.jl

Uniform Resource Identifier (URI) parser in Julia
Julia
17
star
16

HttpParser.jl

Deprecated! Julia wrapper for joyent/http-parser
Julia
14
star
17

GitForge.jl

Unified interface for interacting with Git forges
Julia
12
star
18

IPNets.jl

IPv4 / IPv6 network abstractions for Julia
Julia
11
star
19

MIMEs.jl

MIME information: filetype, encoding, gzip
Julia
9
star
20

OpenSSL.jl

Julia
9
star
21

GnuTLS.jl

Transport Level Security for Julia Streams provided by GnuTLS
Julia
8
star
22

UAParser.jl

Parse user-agent strings into components
Julia
7
star
23

Roadmap

Discussion and planning for JuliaWeb packages
7
star
24

LibSSH.jl

A Julia wrapper for libssh.
Julia
6
star
25

URITemplate.jl

RFC6570 URI templates for Julia
Julia
4
star
26

TransportLayerSecurity.jl

TLS abstraction package for Julia
Julia
2
star
27

HTTP2.jl

Julia
1
star
28

LibCURLBuilder

Julia
1
star
29

MbedTLSBuilder

Julia
1
star
30

GumboBuilder

Deprecated. Now built using https://github.com/JuliaPackaging/Yggdrasil/tree/master/G/Gumbo
Julia
1
star
31

TLSClient.jl

WIP: Julia interface for OS TLS/TCP (mac/iOS: SecureTransport, Linux: OpenSSL, Win: Schannel...)
1
star