]> code.delx.au - gnu-emacs-elpa/blob - examples/0-hello-world.el
match more HTTP methods
[gnu-emacs-elpa] / examples / 0-hello-world.el
1 ;;; hello-world.el --- simple hello world server using Emacs Web Server
2
3 ;; Copyright (C) 2013 Eric Schulte <schulte.eric@gmail.com>
4
5 ;; Author: Eric Schulte <schulte.eric@gmail.com>
6 ;; Keywords: hello http
7 ;; License: GPLV3 (see the COPYING file in this directory)
8
9 ;;; Code:
10 (require 'emacs-web-server)
11
12 (ews-start
13 '(((lambda (_) t) .
14 (lambda (proc request)
15 (ews-response-header proc 200 '("Content-type" . "text/plain"))
16 (process-send-string proc "hello world"))))
17 9000)