Skip to content

Commit ddf033c

Browse files
committed
add getting started to docs
1 parent bdeec7d commit ddf033c

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

docs/index.rst

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,28 @@ Contents:
1111
.. toctree::
1212
:maxdepth: 2
1313

14+
urlmapping
1415
input
1516
db
1617

17-
Hello World
18-
===========
18+
Getting Started
19+
===============
1920

20-
URL Mapping
21-
===========
21+
Building webapps with web.py is easy. To get started, save the following code as say, `hello.py` and run it with `python hello.py`. Now point your browser to `http://localhost:8080/` which responds you with 'Hello, world!'. Hey, you're done with your first program with with web.py - with just 8 lines of code!
2222

23-
urls = (...)
23+
::
2424

25-
regular expressions and grouping
25+
import web
26+
27+
urls = ("/.*", "hello")
28+
app = web.application(urls, globals())
29+
30+
class hello:
31+
def GET(self):
32+
return 'Hello, world!'
33+
34+
if __name__ == "__main__":
35+
app.run()
2636

2737
Indices and tables
2838
==================

0 commit comments

Comments
 (0)