summary refs log tree commit diff stats
path: root/examples/cgi/example.nim
diff options
context:
space:
mode:
Diffstat (limited to 'examples/cgi/example.nim')
-rw-r--r--examples/cgi/example.nim7
1 files changed, 7 insertions, 0 deletions
diff --git a/examples/cgi/example.nim b/examples/cgi/example.nim
new file mode 100644
index 000000000..17629982a
--- /dev/null
+++ b/examples/cgi/example.nim
@@ -0,0 +1,7 @@
+import cgi
+
+write(stdout, "Content-type: text/html\n\n")
+write(stdout, "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\">\n")
+write(stdout, "<html><head><title>Test</title></head><body>\n")
+write(stdout, "Hello!")
+writeln(stdout, "</body></html>")