1
0
mirror of https://github.com/actix/actix-website synced 2024-11-30 11:12:57 +01:00

Cargo can't do nested workspaces.

This commit is contained in:
Cameron Dershem 2019-06-13 00:32:48 -04:00
parent e43f408bce
commit 315b131cdd
14 changed files with 17 additions and 21 deletions

View File

@ -1,8 +1,12 @@
[workspace]
members = [
"application",
"front-page",
"easy-form-handling",
"flexible-responders",
"getting-started",
"main-example",
"powerful-extractors",
"request-routing",
"server",
"url-dispatch",
]

View File

@ -27,8 +27,8 @@ fn main() {
.route("/", web::get().to(index))
.route("/register", web::post().to(register))
})
.bind("127.0.0.1:8000")
.expect("Can not bind to port 8000")
.bind("127.0.0.1:8088")
.unwrap()
.run()
.unwrap();
}

View File

@ -6,7 +6,7 @@
</head>
<body>
<h3>Will hit handle_post_1</h3>
<h3>Its a form.</h3>
<form action=/register method=POST>

View File

@ -21,8 +21,8 @@ fn main() {
.service(web::resource("/").to(hello_world))
.service(web::resource("/temp").to(current_temperature))
})
.bind("127.0.0.1:8000")
.expect("Can not bind to port 8000")
.bind("127.0.0.1:8088")
.unwrap()
.run()
.unwrap();
}

View File

@ -1,8 +0,0 @@
[workspace]
members = [
"main-example",
"flexible-responders",
"easy-form-handling",
"request-routing",
"powerful-extractors",
]

View File

@ -1,5 +1,5 @@
[package]
name = "front-page"
name = "main-example"
version = "0.1.0"
edition = "2018"

View File

@ -12,8 +12,8 @@ fn main() {
.service(web::resource("/").to(greet))
.service(web::resource("/{name}").to(greet))
})
.bind("127.0.0.1:8000")
.expect("Can not bind to port 8000")
.bind("127.0.0.1:8088")
.unwrap()
.run()
.unwrap();
}

View File

@ -37,8 +37,8 @@ fn main() {
.route("/", web::get().to(index))
.route("/event", web::post().to(capture_event))
})
.bind("127.0.0.1:8000")
.expect("Can not bind to port 8000")
.bind("127.0.0.1:8088")
.unwrap()
.run()
.unwrap();
}

View File

@ -18,7 +18,7 @@
}
function submitJson() {
fetch('http://localhost:8000/event', {
fetch('http://localhost:8088/event', {
method: 'POST',
headers: {
'Accept': 'application/json',

View File

@ -15,7 +15,7 @@ fn main() {
.service(web::resource("/").to(index))
.service(web::resource("/{name}").to(hello))
})
.bind("127.0.0.1:8000")
.bind("127.0.0.1:8088")
.unwrap()
.run()
.unwrap();