Created
January 10, 2019 07:48
-
-
Save matthewfl/47c78fb9fbc92e98ab8beab7f7a5b40a to your computer and use it in GitHub Desktop.
Guile running a webserver from a makefile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define WEBSERVER:= | |
(define (handler req reqb) (values '((content-type . (text/plain) )) "Hello world from a makefile!!!") ) | |
(use-modules (web server)) | |
(use-modules (web http)) | |
(run-server handler 'http '(#:port 9999)) | |
endef | |
all: | |
$(info open your browswer to http://localhost:9999) | |
$(guile $(WEBSERVER)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment