summaryrefslogtreecommitdiff
path: root/modules/httpd-config.el
blob: c0ac20ee325174923b3058ac2e79509199923ad3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
;;; httpd-config --- Setup for a Simple HTTP Server -*- lexical-binding: t; -*-
;; author Craig Jennings <c@cjennings.net>

;;; Commentary:

;;; Code:


;;;; -------------------------- Simple-Httpd -------------------------

(use-package simple-httpd
  :defer 1
  :preface
  (defconst wwwdir (concat user-emacs-directory "www"))
  (defun check-or-create-wwwdir ()
    (unless (file-exists-p wwwdir)
      (make-directory wwwdir)))
  :init (check-or-create-wwwdir)
  :config
  (setq httpd-root wwwdir)
  (setq httpd-show-backtrace-when-error t)
  (setq httpd-serve-files t))


(provide 'httpd-config)
;;; httpd-config.el ends here