Opa (programming language): Difference between revisions

Content deleted Content added
Codename Lisa (talk | contribs)
lang=opa
Line 43:
The traditional [[Hello world program]], producing a web server that serves a static page with "Hello, web!" as its content, can be written in Opa as:<ref>{{cite web |url=http://www.morganhill.co.uk/cloud/opa-the-cloud-language-test-drive/|title=Opa, the cloud language – a test drive |date=26 July 2011 |publisher=Morgan Hill |author=Alastair Aitken}}</ref>
 
<source lang="html5opa">
Server.start(Server.http,
{ title: "Hello"
Line 53:
It can be compiled to a stand-alone executable JS file with:
<source lang="bash">
$ opa hello_web.opa
</source>
 
Running the resulting executable JS file launches the web application:
<source lang="bash">
$ ./hello_web.js
</source>