diff options
author | Michał Zieliński <michal@zielinscy.org.pl> | 2013-12-18 18:19:32 +0100 |
---|---|---|
committer | Michał Zieliński <michal@zielinscy.org.pl> | 2013-12-18 18:19:32 +0100 |
commit | 101d8bc9c333546b970e670be116e45788a069d0 (patch) | |
tree | cf3a653559e5fb44ab7b1e106dc5ffa019d2f961 /examples/cgi/example.nim | |
parent | 74a63c004fe188bc710d6867e451f894c70381be (diff) | |
download | Nim-101d8bc9c333546b970e670be116e45788a069d0.tar.gz |
Add two CGI example and basic Python CGI server.
Diffstat (limited to 'examples/cgi/example.nim')
-rw-r--r-- | examples/cgi/example.nim | 7 |
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>") |