From 5bb8416bafe051bc81d8d0c4ec7b6f81c180a808 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Mon, 29 Jul 2019 19:46:26 +0200 Subject: [PATCH] update vweb readme --- vlib/vweb/README.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/vlib/vweb/README.md b/vlib/vweb/README.md index ef886a69f1..b1aafd919e 100644 --- a/vlib/vweb/README.md +++ b/vlib/vweb/README.md @@ -1,8 +1,12 @@ +This is pre-alpha software. + +Lots of things are broken and not implemented yet in V and vweb. + There's no documentation yet, have a look at https://github.com/vlang/vtalk for an example of a simple vweb app. `vtalk.v` contains all GET and POST actions. -``` +```Go pub fn (app mut App) index() { posts := app.find_all_posts() $vweb.html() @@ -25,7 +29,7 @@ pub fn (app App) post() { `index.html` is an example of the V template language: -``` +```html @for post in posts
@post.title @@ -39,3 +43,9 @@ pub fn (app App) post() { `$vweb.html()` compiles an HTML template into V during compilation, and embeds the resulting code in current action. That means that the template automatically has access to that action's entire environemnt. + + +### Deploying vweb apps + +Everything, including HTML templates, is in one binary file. That's all you need to deploy. +