nickel.rs

An expressjs inspired web framework for Rust

Github星跟蹤圖

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 :)

主要指標

概覽
名稱與所有者nickel-org/nickel.rs
主編程語言Rust
編程語言Rust (語言數: 1)
平台
許可證MIT License
所有者活动
創建於2014-06-03 22:36:19
推送於2022-05-10 11:40:42
最后一次提交2022-05-06 06:22:14
發布數12
最新版本名稱0.9.0 (發布於 )
第一版名稱0.2.0 (發布於 )
用户参与
星數3k
關注者數71
派生數157
提交數647
已啟用問題?
問題數230
打開的問題數46
拉請求數152
打開的拉請求數8
關閉的拉請求數73
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?