mirror of
https://github.com/agersant/polaris
synced 2024-12-02 17:49:10 +00:00
Serve web client
This commit is contained in:
parent
16c609cd20
commit
e2b1db599b
5 changed files with 21 additions and 0 deletions
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
[submodule "web"]
|
||||
path = web
|
||||
url = https://github.com/agersant/polaris-web.git
|
13
Cargo.lock
generated
13
Cargo.lock
generated
|
@ -6,6 +6,7 @@ dependencies = [
|
|||
"mount 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"router 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"staticfile 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"toml 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 1.2.0 (git+https://github.com/servo/rust-url)",
|
||||
]
|
||||
|
@ -224,6 +225,18 @@ dependencies = [
|
|||
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "staticfile"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"iron 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mount 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "time"
|
||||
version = "0.1.35"
|
||||
|
|
|
@ -15,6 +15,7 @@ rustc-serialize = "0.3"
|
|||
[dependencies]
|
||||
router = "*"
|
||||
mount = "*"
|
||||
staticfile = "*"
|
||||
|
||||
[dependencies]
|
||||
toml = "0.2"
|
|
@ -2,6 +2,7 @@ extern crate core;
|
|||
extern crate iron;
|
||||
extern crate mount;
|
||||
extern crate rustc_serialize;
|
||||
extern crate staticfile;
|
||||
extern crate toml;
|
||||
extern crate url;
|
||||
|
||||
|
@ -11,6 +12,7 @@ use std::sync::Mutex;
|
|||
|
||||
use iron::prelude::*;
|
||||
use mount::Mount;
|
||||
use staticfile::Static;
|
||||
|
||||
mod api;
|
||||
mod collection;
|
||||
|
@ -30,6 +32,7 @@ fn main() {
|
|||
let mut mount = Mount::new();
|
||||
let api_handler = get_api_handler(collection);
|
||||
mount.mount("/api/", api_handler);
|
||||
mount.mount("/", Static::new(Path::new("web")));
|
||||
|
||||
Iron::new(mount).http("localhost:3000").unwrap();
|
||||
}
|
||||
|
|
1
web
Submodule
1
web
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 93516f23734f9e36fcf0d3aaa4244082faf26acd
|
Loading…
Reference in a new issue