9 unstable releases

0.11.0 Jan 15, 2019
0.10.2 Nov 28, 2018
0.10.1 Dec 4, 2017
0.10.0 Jun 7, 2017
0.6.0 Jul 16, 2015

#210 in Web programming

Download history 718/week @ 2020-02-09 594/week @ 2020-02-16 735/week @ 2020-02-23 734/week @ 2020-03-01 1127/week @ 2020-03-08 1115/week @ 2020-03-15 878/week @ 2020-03-22 352/week @ 2020-03-29 414/week @ 2020-04-05 506/week @ 2020-04-12 450/week @ 2020-04-19 458/week @ 2020-04-26 375/week @ 2020-05-03 377/week @ 2020-05-10 495/week @ 2020-05-17 490/week @ 2020-05-24

3,412 downloads per month
Used in less than 19 crates

MIT license

135KB
2.5K SLoC

nickel.rs Build Status license Join the chat at https://gitter.im/nickel-org/nickel.rs

nickel.rs is a simple and lightweight foundation for web applications written in Rust. Its API is inspired by the popular express framework for JavaScript.

Hello world

#[macro_use] extern crate nickel;

use nickel::{Nickel, HttpRouter};

fn main() {
    let mut server = Nickel::new();
    server.get("**", middleware!("Hello World"));
    server.listen("127.0.0.1:6767");
}

Dependencies

You'll need to create a Cargo.toml that looks like this;

[package]

name = "my-nickel-app"
version = "0.0.1"
authors = ["yourname"]

[dependencies.nickel]
version = "*"
# If you are using the 'nightly' rust channel you can uncomment
# the line below to activate unstable features
# features = ["unstable"]

# Some examples require the `rustc_serialize` crate, which will
# require uncommenting the lines below
# [dependencies]
# rustc-serialize = "*"

You can then compile this using Cargo build and run it using Cargo run. After it's running you should visit http://localhost:6767 to see your hello world!

More examples

More examples can be found in the examples directory and the full documentation can be found here.

Contributing

nickel.rs is a community effort. We welcome new contributors with open arms. Please read the contributing guide here first.

If you're looking for inspiration, there's list of open issues right here on github.

If you need a helping hand reach out to @jolhoeft, @cburgdorf, @Ryman or @SimonPersson.

And hey, did you know you can also contribute by just starring the project here on github :)

Dependencies

~5.5MB
~141K SLoC