tutorial: minor fixes
parent
94de493b37
commit
45695543ba
|
@ -81,7 +81,11 @@ Run it with
|
||||||
v run blog.v
|
v run blog.v
|
||||||
```
|
```
|
||||||
|
|
||||||
and open http://localhost:8080/ in your browser:
|
```
|
||||||
|
Running a Vweb app on http://localhost:8080 ...
|
||||||
|
```
|
||||||
|
|
||||||
|
Vweb helpfully provided a link, open http://localhost:8080/ in your browser:
|
||||||
|
|
||||||
<img width=662 src="https://github.com/vlang/v/blob/master/tutorials/hello.png?raw=true)">
|
<img width=662 src="https://github.com/vlang/v/blob/master/tutorials/hello.png?raw=true)">
|
||||||
|
|
||||||
|
|
|
@ -124,7 +124,7 @@ fn (ctx &Context) get_header(key string) string {
|
||||||
|
|
||||||
//pub fn run<T>(port int) {
|
//pub fn run<T>(port int) {
|
||||||
pub fn run<T>(app mut T, port int) {
|
pub fn run<T>(app mut T, port int) {
|
||||||
println('Running vweb app on http://localhost:$port ...')
|
println('Running a Vweb app on http://localhost:$port ...')
|
||||||
l := net.listen(port) or { panic('failed to listen') }
|
l := net.listen(port) or { panic('failed to listen') }
|
||||||
//mut app := T{}
|
//mut app := T{}
|
||||||
app.init()
|
app.init()
|
||||||
|
|
Loading…
Reference in New Issue