1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

tutorial: minor fixes

This commit is contained in:
Alexander Medvednikov 2019-12-14 18:59:02 +03:00
parent 94de493b37
commit 45695543ba
3 changed files with 6 additions and 2 deletions

View File

@ -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)">

View File

@ -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()