View

This file was deleted.

Oops, something went wrong.
View

This file was deleted.

Oops, something went wrong.
View
@@ -2,7 +2,6 @@
"framework": "hyper",
"tests": [{
"default": {
"setup_file": "setup",
"json_url": "/json",
"plaintext_url": "/plaintext",
"port": 8080,
View
@@ -0,0 +1,8 @@
FROM tfb/rust:latest
COPY ./ ./
RUN cargo clean
RUN RUSTFLAGS="-C target-cpu=native" cargo build --release
CMD ./target/release/hello
View

This file was deleted.

Oops, something went wrong.
View
@@ -2,7 +2,6 @@
"framework": "iron",
"tests": [{
"default": {
"setup_file": "setup",
"json_url": "/json",
"db_url": "/db",
"fortune_url": "/fortune",
View
@@ -0,0 +1,7 @@
FROM tfb/rust:latest
COPY ./ ./
RUN cargo clean
RUN RUSTFLAGS="-C target-cpu=native" cargo build --release
CMD ./target/release/iron
View

This file was deleted.

Oops, something went wrong.
View
@@ -0,0 +1,11 @@
[package]
name = "may-minihttp"
version = "0.1.0"
authors = ["Xudong Huang <huangxu008@hotmail.com>"]
[dependencies]
num_cpus = "1.0"
serde = "1.0"
serde_json = "1.0"
may = { git = "https://github.com/Xudong-Huang/may" }
may_minihttp = { git = "https://github.com/Xudong-Huang/may_minihttp" }
View
@@ -0,0 +1,15 @@
# [may-minihttp](https://github.com/Xudong-Huang/may_minihttp) web framework
## Description
may-minihttp is a small, fast micro http framework based on [May](https://github.com/Xudong-Huang/may)
## Test URLs
### Test 1: JSON Encoding
http://localhost:8080/json
### Test 2: Plaintext
http://localhost:8080/plaintext
View
@@ -0,0 +1,23 @@
{
"framework": "may-minihttp",
"tests": [
{
"default": {
"json_url": "/json",
"plaintext_url": "/plaintext",
"port": 8080,
"approach": "Realistic",
"classification": "Micro",
"database": "None",
"framework": "may-minihttp",
"language": "Rust",
"orm": "raw",
"platform": "Rust",
"webserver": "may-minihttp",
"os": "Linux",
"database_os": "Linux",
"display_name": "may-minihttp"
}
}
]
}
View
@@ -0,0 +1,8 @@
FROM tfb/rust:latest
COPY ./ ./
RUN cargo clean
RUN RUSTFLAGS="-C target-cpu=native" cargo build --release
CMD ./target/release/may-minihttp
View
@@ -0,0 +1,40 @@
extern crate may;
extern crate num_cpus;
#[macro_use]
extern crate serde_json;
extern crate may_minihttp;
use std::io;
use may_minihttp::{HttpServer, HttpService, Request, Response};
struct Techempower;
impl HttpService for Techempower {
fn call(&self, req: Request) -> io::Result<Response> {
let mut resp = Response::new();
// Bare-bones router
match req.path() {
"/json" => {
resp.header("Content-Type", "application/json");
*resp.body_mut() =
serde_json::to_vec(&json!({"message": "Hello, World!"})).unwrap();
}
"/plaintext" => {
resp.header("Content-Type", "text/plain")
.body("Hello, World!");
}
_ => {
resp.status_code(404, "Not Found");
}
}
Ok(resp)
}
}
fn main() {
may::config().set_io_workers(num_cpus::get());
let server = HttpServer(Techempower).start("0.0.0.0:8080").unwrap();
server.join().unwrap();
}
View
@@ -2,7 +2,6 @@
"framework": "nickel",
"tests": [{
"default": {
"setup_file": "setup",
"json_url": "/json",
"plaintext_url": "/plaintext",
"port": 8080,
View
@@ -0,0 +1,8 @@
FROM tfb/rust:latest
COPY ./ ./
RUN cargo clean
RUN RUSTFLAGS="-C target-cpu=native" cargo build --release
CMD ./target/release/nickel
View

This file was deleted.

Oops, something went wrong.
View
@@ -2,7 +2,6 @@
"framework": "rouille",
"tests": [{
"default": {
"setup_file": "setup",
"json_url": "/json",
"plaintext_url": "/plaintext",
"port": 8080,
View
@@ -0,0 +1,8 @@
FROM tfb/rust:latest
COPY ./ ./
RUN cargo clean
RUN RUSTFLAGS="-C target-cpu=native" cargo build --release
CMD ./target/release/rouille
View

This file was deleted.

Oops, something went wrong.
View
@@ -2,7 +2,6 @@
"framework": "tokio-minihttp",
"tests": [{
"default": {
"setup_file": "setup",
"json_url": "/json",
"plaintext_url": "/plaintext",
"db_url": "/db",
View

This file was deleted.

Oops, something went wrong.
View
@@ -0,0 +1,8 @@
FROM tfb/rust:latest
COPY ./ ./
RUN cargo clean
RUN RUSTFLAGS="-C target-cpu=native" cargo build --release
CMD ./target/release/tokio-minihttp
View
@@ -1,7 +1,21 @@
FROM ubuntu:16.04
RUN apt-get update
RUN apt-get install -qqy software-properties-common build-essential curl locales wget unzip git
# Install some common development tools
RUN apt-get install -y software-properties-common build-essential curl locales wget unzip git \
libmysqlclient-dev libpq-dev \
libpcre3 libpcre3-dev \
libssl-dev libcurl4-openssl-dev \
zlib1g-dev \
libreadline6-dev \
libbz2-dev \
libxslt-dev libgdbm-dev ncurses-dev \
libffi-dev libtool bison libevent-dev \
libgstreamer-plugins-base0.10-0 libgstreamer0.10-0 \
liborc-0.4-0 libgnutls-dev \
libjson0-dev libmcrypt-dev libicu-dev \
re2c libnuma-dev
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
View
@@ -0,0 +1,3 @@
FROM tfb/base:latest
RUN curl -sSL https://get.haskellstack.org/ | sh
View
@@ -0,0 +1,21 @@
FROM tfb/nginx:latest
ENV NIM_VERSION="0.11.2"
ENV NIM_CSOURCES="6bf2282"
RUN wget https://github.com/nim-lang/Nim/archive/v$NIM_VERSION.tar.gz
RUN tar xvf v$NIM_VERSION.tar.gz
RUN mv Nim-$NIM_VERSION nim
RUN cd nim && \
git clone git://github.com/nim-lang/csources.git && \
cd csources && \
git checkout $NIM_CSOURCES && \
sh build.sh && \
cd .. && \
bin/nim c koch && \
./koch boot -d:release
ENV NIM_HOME=/nim
ENV PATH=${NIM_HOME}/bin:${PATH}
View
@@ -0,0 +1,12 @@
FROM tfb/base:latest
ENV RUST_VERSION="1.24.1"
RUN wget https://static.rust-lang.org/dist/rust-${RUST_VERSION}-x86_64-unknown-linux-gnu.tar.gz
RUN tar xvf rust-${RUST_VERSION}-x86_64-unknown-linux-gnu.tar.gz
RUN cd rust-${RUST_VERSION}-x86_64-unknown-linux-gnu && \
./install.sh --prefix=/rust
ENV LD_LIBRARY_PATH=/rust/lib:${LD_LIBRARY_PATH}
ENV PATH=/rust/bin:${PATH}
View
@@ -0,0 +1,11 @@
FROM tfb/nim:latest
ENV NIMBLE_VERSION="0.6.2"
RUN cd $NIM_HOME && \
wget https://github.com/nim-lang/nimble/archive/v$NIMBLE_VERSION.tar.gz && \
tar xvf v$NIMBLE_VERSION.tar.gz && \
mv nimble-$NIMBLE_VERSION nimble && \
cd nimble && \
../bin/nim c src/nimble && \
mv src/nimble ../bin/
View

This file was deleted.

Oops, something went wrong.
View

This file was deleted.

Oops, something went wrong.
View

This file was deleted.

Oops, something went wrong.
View

This file was deleted.

Oops, something went wrong.
View

This file was deleted.

Oops, something went wrong.
View

This file was deleted.

Oops, something went wrong.