1
0
mirror of https://github.com/actix/actix-website synced 2024-11-27 18: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] [workspace]
members = [ members = [
"application", "application",
"front-page", "easy-form-handling",
"flexible-responders",
"getting-started", "getting-started",
"main-example",
"powerful-extractors",
"request-routing",
"server", "server",
"url-dispatch", "url-dispatch",
] ]

View File

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

View File

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

View File

@ -21,8 +21,8 @@ fn main() {
.service(web::resource("/").to(hello_world)) .service(web::resource("/").to(hello_world))
.service(web::resource("/temp").to(current_temperature)) .service(web::resource("/temp").to(current_temperature))
}) })
.bind("127.0.0.1:8000") .bind("127.0.0.1:8088")
.expect("Can not bind to port 8000") .unwrap()
.run() .run()
.unwrap(); .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] [package]
name = "front-page" name = "main-example"
version = "0.1.0" version = "0.1.0"
edition = "2018" edition = "2018"

View File

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

View File

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

View File

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

View File

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