Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 14 additions & 19 deletions muntjac/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -206,27 +206,22 @@ <h5>Sampler Widget Set</h5>

<div class="col2">
<h5>Simple Application</h5>
<p>To create a Muntjac application first define a subclass of <a href="http://doc.muntiacus.org/api/muntjac.application.Application-class.html">Application</a>:</p>
<pre>
class HelloWorld(Application):

def init(self):
main = Window('Hello window')
self.setMainWindow(main)

main.addComponent(Label('Hello World!'))</pre>
Pass the new class to <a href="http://doc.muntiacus.org/api/muntjac.terminal.gwt.server.application_servlet.ApplicationServlet-class.html">ApplicationServlet</a>,
wrap the resulting WSGI application in <a href="http://pythonpaste.org/modules/session.html">Paste</a> session middleware and <a href="http://docs.python.org/library/wsgiref.html#module-wsgiref.simple_server">serve</a>:
<pre>
wsgi_app = ApplicationServlet(HelloWorld, debug=True)

wsgi_app = paste.session.SessionMiddleware(wsgi_app)

httpd = make_server('localhost', 8080, wsgi_app)
httpd.serve_forever()</pre>
Navigate your browser to <a href="http://localhost:8080/"><tt>http://localhost:8080/</tt></a>. For further information please refer to
<p>To create a Muntjac
application:</p>
<ol>
<li>Follow <a
href="https://gist.github.com/anonymous/6637ca9de5d2ce78cd20">these instructions</a></li>

<li>Navigate your
browser to <a
href="http://localhost:8880/"><tt>http://localhost:8080/</tt></a>.
</li>
</ol>
<p>
For further information please refer to
the <a href="http://doc.muntiacus.org/api" title="Open doc.muntiacus.org/api">API documentation</a> and the
<a href="https://vaadin.com/book/-/page/preface.html">Vaadin documentation</a>.
</p>
</div>
</li>

Expand Down