]> code.delx.au - gnu-emacs-elpa/blob - packages/web-server/examples/002-hello-world-html.el
be054c7238d123af6da6fbe6e12aefdd8e322ed4
[gnu-emacs-elpa] / packages / web-server / examples / 002-hello-world-html.el
1 ;;; hello-world-html.el --- html hello world server using Emacs Web Server
2 (ws-start
3 (lambda (request)
4 (with-slots (process headers) request
5 (ws-response-header process 200 '("Content-type" . "text/html"))
6 (process-send-string process "<html>
7 <head>
8 <title>Hello World</title>
9 </head>
10 <body>
11 <b>hello world</b>
12 </body>
13 </html>")))
14 9002)