Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Initial commit

  • Loading branch information...
commit 9fde1fbffb89d7f6252c83816204401aedeef75e 0 parents
@akoprow akoprow authored
Showing with 31 additions and 0 deletions.
  1. +15 −0 .gitignore
  2. +16 −0 hello_opa.opa
15 .gitignore
@@ -0,0 +1,15 @@
+*.api
+*.api-txt
+*.log
+opa-debug-js
+*html
+_build
+*.opx
+*.opx.broken
+*.opp
+*.o
+*.dump
+*~
+.DS_Store
+_tracks
+*.exe
16 hello_opa.opa
@@ -0,0 +1,16 @@
+database { int /counter = 0 };
+
+function action(_) {
+ /counter <- /counter + 1;
+ #msg = <>Hello, user number {/counter}!</>;
+}
+
+function page() {
+ <h1 onclick={action}>Hello, world</h1>
+ <div id="msg">Click the header</div>
+}
+
+Server.start(
+ Server.http,
+ { ~page, title: "Hello, world" }
+)

0 comments on commit 9fde1fb

Please sign in to comment.
Something went wrong with that request. Please try again.