]> code.delx.au - gnu-emacs-elpa/blob - packages/web-server/examples/002-hello-world-html.el
Merge commit '0cda39255827f283e7578cd469ae42daad9556a2' from js2-mode
[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 ;; Copyright (C) 2014 Free Software Foundation, Inc.
3
4 (ws-start
5 (lambda (request)
6 (with-slots (process headers) request
7 (ws-response-header process 200 '("Content-type" . "text/html"))
8 (process-send-string process "<html>
9 <head>
10 <title>Hello World</title>
11 </head>
12 <body>
13 <b>hello world</b>
14 </body>
15 </html>")))
16 9002)