Add two CGI example and basic Python CGI server.
This commit is contained in:
parent
74a63c004f
commit
101d8bc9c3
4 changed files with 25 additions and 0 deletions
7
examples/cgi/example.nim
Normal file
7
examples/cgi/example.nim
Normal file
|
|
@ -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>")
|
||||
Loading…
Add table
Add a link
Reference in a new issue