summaryrefslogtreecommitdiff
path: root/modules/httpd-config.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
committerCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
commit754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch)
treef1190704f78f04a2b0b4c977d20fe96a828377f1 /modules/httpd-config.el
new repository
Diffstat (limited to 'modules/httpd-config.el')
-rw-r--r--modules/httpd-config.el26
1 files changed, 26 insertions, 0 deletions
diff --git a/modules/httpd-config.el b/modules/httpd-config.el
new file mode 100644
index 00000000..c0ac20ee
--- /dev/null
+++ b/modules/httpd-config.el
@@ -0,0 +1,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