Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
checker: add -skip-unused support for vweb.run_at too (#18884)
- Loading branch information
Showing
4 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[Vweb] Running app on http://localhost:38090/ | ||
[Vweb] We have 1 workers | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[Vweb] Running app on http://localhost:38090/ | ||
[Vweb] We have 1 workers | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import vweb | ||
import time | ||
|
||
struct App { | ||
vweb.Context | ||
} | ||
|
||
fn main() { | ||
spawn fn () { | ||
time.sleep(100 * time.millisecond) | ||
println('done') | ||
exit(0) | ||
}() | ||
vweb.run_at(&App{}, port: 38090, nr_workers: 1)! | ||
// vweb.run(&App{}, 38091) | ||
} | ||
|
||
['/'] | ||
pub fn (mut app App) app_main() vweb.Result { | ||
return app.text('Hello World') | ||
} |