• Stars
    star
    148
  • Rank 241,641 (Top 5 %)
  • Language
    Crystal
  • License
    MIT License
  • Created over 8 years ago
  • Updated about 3 years ago

Reviews

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

Repository Details

Super fast, zero configuration command line HTTP Server.

fast-http-server

Super fast, zero configuration command line HTTP Server written in Crystal programming language.

Usage

Zero configuration: fast-http-server and your server's ready.

usage: fast-http-server [-h] [-d DIR] [port]

positional arguments:
    port                             specify alternate port [default: 3000]

optional arguments:
    -h, --help                       show this help message and exit
    -d DIR, --directory DIR          specify a directory
    -l LIST, --listdir LIST          enable/disable directory listing (yes/no)

By default fast-http-server listens port 3000. Go to localhost:3000.

To listen on a different port you can start fast-http-server with the desired port: fast-http-server 5050

To choose a directory: fast-http-server -d example_directory

Fast

$ wrk -c 100 -d 20 -t 4 --latency http://localhost:3000

Running 20s test @ http://localhost:3000
  4 threads and 100 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     3.98ms  615.13us  12.73ms   77.06%
    Req/Sec     6.31k   347.48     7.05k    77.88%
  Latency Distribution
     50%    3.87ms
     75%    4.27ms
     90%    4.75ms
     99%    5.86ms
  502556 requests in 20.02s, 456.75MB read
Requests/sec:  25102.60
Transfer/sec:     22.81MB

Installation

OS X

You can install fast-http-server via Brew.

brew tap sdogruyol/fast-http-server
brew install fast-http-server

Manual

fast-http-server requires Crystal 1.0.0 You can install it here

git clone https://github.com/sdogruyol/fast-http-server
crystal build --release src/fast-http-server.cr
mv fast-http-server /usr/local/bin/fast-http-server

Protip

For quick use, add

alias fhs='fast-http-server'

to your .bashrc | .zshrc | Profile file

More Repositories

1

awesome-ruby

A curated list of awesome Ruby frameworks, libraries and resources. Inspired by awesome-php & awesome-python.
1,247
star
2

cryload

HTTP benchmarking tool written in Crystal
Crystal
121
star
3

tren

Give your SQL some love
Crystal
115
star
4

aws

Unofficial AWS SDK for Crystal
Crystal
70
star
5

kemal-chat

Sample application to demonstrate how easy it is to build realtime applications with Kemal using WebSocket.
HTML
63
star
6

cloud_backup

Easily dump your database and store it in the cloud.
Ruby
38
star
7

gencleredestek.com

gencleredestek.com website source code
Ruby
36
star
8

crystal-weekly

Crystal Weekly Website
SCSS
30
star
9

friends-of-crystal

Organizations running Crystal in production
HTML
30
star
10

capistrano-kemal

Capistrano integration for Kemal
Ruby
25
star
11

cuba-generator

Application Generator for Cuba framework
Ruby
23
star
12

crystal_for_rubyists

Crystal For Rubyists
HTML
23
star
13

kemal-github-api

Github API routes benchmark for Kemal
Crystal
21
star
14

kemal-pg

Easily add Postgresql database to Kemal
Crystal
21
star
15

crystal-for-rubyists-en

20
star
16

kemal-mysql

Easily add MySQL database to your Kemal application.
Crystal
14
star
17

safran

Safran için Ruby ile yazılmış Command Line okuyucusu.
Ruby
13
star
18

rust-vs-ruby

Sample applications for 'Rust vs Ruby: Building an API' blog post
Rust
11
star
19

kemal-showdown

🏇 benchmark Kemal with Sinatra-like web frameworks
JavaScript
10
star
20

multipart

Multipart Form Data parser for Crystal
Crystal
10
star
21

safran-api

Safran Unofficial API
Ruby
8
star
22

amethyst-bin

Bash script for automatically setting up an Amethyst skeleton project including dependencies
Shell
7
star
23

calculator-tdd

An example of applied TDD with a simple calculator
Ruby
7
star
24

cuba-datamapper-sample

Sample application to show the simplicity and power of Cuba
Ruby
6
star
25

lyk2017-blog

Ruby
6
star
26

kemal-redis

Easily add Redis to Kemal
Crystal
6
star
27

sdogruyol.github.io

serdardogruyol.com source code
SCSS
5
star
28

hn_reader

Hacker News Reader Gui built with Jruby
Ruby
5
star
29

kemal-blog

CSS
4
star
30

russh

Russh: Ruby + SSH. SSH Config Management the Ruby way.
Ruby
4
star
31

kemal-pg-sample

Sample app to demonstrate kemal + postgresql usage
Crystal
4
star
32

critcoin

Crystal
3
star
33

crystal-for-rubyists-cn

Crystal for Rubyists Chinese Version
2
star
34

elixir_schizo

Example project from Elixir Sips
Elixir
1
star
35

lyk2015-ruby101

Linux Yaz Kampı 2015 Ruby 101 içeriği
JavaScript
1
star
36

kemal-multi-path

Crystal
1
star
37

homebrew-cryload

Brew tap for Cryload
Ruby
1
star
38

erc20-tracker

Simple ERC20 token tracker
JavaScript
1
star
39

kemalturkiye.org

HTML
1
star