summaryrefslogtreecommitdiffstats
path: root/fluent-bit/lib/monkey/examples/hello.py
diff options
context:
space:
mode:
Diffstat (limited to 'fluent-bit/lib/monkey/examples/hello.py')
-rw-r--r--fluent-bit/lib/monkey/examples/hello.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/fluent-bit/lib/monkey/examples/hello.py b/fluent-bit/lib/monkey/examples/hello.py
new file mode 100644
index 000000000..bf4b5becd
--- /dev/null
+++ b/fluent-bit/lib/monkey/examples/hello.py
@@ -0,0 +1,12 @@
+import monkey
+
+f = open('/tmp/index.html', 'w')
+f.write("<html><body><h2>Hello Monkey</h2></body></html>")
+f.close()
+
+monkey.init(None, 0, 0, '/tmp/')
+monkey.configure(indexfile='index.html')
+
+monkey.start()
+raw_input("Press enter to stop the server...")
+monkey.stop()