File tree 9 files changed +9
-9
lines changed 9 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ async fn echo_form(mut cx: Context<()>) -> EndpointResult {
41
41
Ok ( forms:: form ( msg) )
42
42
}
43
43
44
- pub fn main ( ) {
44
+ fn main ( ) {
45
45
let mut app = App :: new ( ) ;
46
46
47
47
app. at ( "/echo/string" ) . post ( echo_string) ;
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ async fn echo_path(cx: Context<()>) -> String {
7
7
format ! ( "Your path is: {}" , path)
8
8
}
9
9
10
- pub fn main ( ) {
10
+ fn main ( ) {
11
11
let mut app = tide:: App :: new ( ) ;
12
12
app. at ( "/echo_path/*path" ) . get ( echo_path) ;
13
13
app. run ( "127.0.0.1:8000" ) . unwrap ( ) ;
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ async fn remove_cookie(mut cx: Context<()>) {
18
18
cx. remove_cookie ( Cookie :: named ( "hello" ) ) . unwrap ( ) ;
19
19
}
20
20
21
- pub fn main ( ) {
21
+ fn main ( ) {
22
22
let mut app = tide:: App :: new ( ) ;
23
23
app. middleware ( CookiesMiddleware :: new ( ) ) ;
24
24
Original file line number Diff line number Diff line change 2
2
3
3
use tide:: middleware:: DefaultHeaders ;
4
4
5
- pub fn main ( ) {
5
+ fn main ( ) {
6
6
let mut app = tide:: App :: new ( ) ;
7
7
8
8
app. middleware (
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ async fn handle_graphql(mut cx: Context<Data>) -> EndpointResult {
58
58
Ok ( resp)
59
59
}
60
60
61
- pub fn main ( ) {
61
+ fn main ( ) {
62
62
let mut app = App :: with_state ( Data :: default ( ) ) ;
63
63
app. at ( "/graphql" ) . post ( handle_graphql) ;
64
64
app. run ( "127.0.0.1:8000" ) . unwrap ( ) ;
Original file line number Diff line number Diff line change 1
1
#![ feature( async_await) ]
2
2
3
- pub fn main ( ) {
3
+ fn main ( ) {
4
4
let mut app = tide:: App :: new ( ) ;
5
5
app. at ( "/" ) . get ( async move |_| "Hello, world!" ) ;
6
6
app. run ( "127.0.0.1:8000" ) . unwrap ( ) ;
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ async fn get_message(cx: Context<Database>) -> EndpointResult {
66
66
}
67
67
}
68
68
69
- pub fn main ( ) {
69
+ fn main ( ) {
70
70
let mut app = App :: with_state ( Database :: default ( ) ) ;
71
71
app. at ( "/message" ) . post ( new_message) ;
72
72
app. at ( "/message/:id" ) . get ( get_message) . post ( set_message) ;
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ async fn upload_file(mut cx: Context<()>) -> EndpointResult {
57
57
Ok ( response:: json ( message) )
58
58
}
59
59
60
- pub fn run ( ) {
60
+ fn main ( ) {
61
61
let mut app = App :: new ( ) ;
62
62
app. at ( "/upload_file" ) . post ( upload_file) ;
63
63
app. run ( "127.0.0.1:8000" ) . unwrap ( ) ;
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ async fn handle_path(ctx: Context<StaticFile>) -> EndpointResult {
121
121
} )
122
122
}
123
123
124
- pub fn main ( ) {
124
+ fn main ( ) {
125
125
let mut app = App :: with_state ( StaticFile :: new ( "./" ) ) ;
126
126
app. at ( "/*" ) . get ( handle_path) ;
127
127
app. run ( "127.0.0.1:8000" ) . unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments