Skip to content

Instantly share code, notes, and snippets.

@matthewfl
Created January 10, 2019 07:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matthewfl/47c78fb9fbc92e98ab8beab7f7a5b40a to your computer and use it in GitHub Desktop.
Save matthewfl/47c78fb9fbc92e98ab8beab7f7a5b40a to your computer and use it in GitHub Desktop.
Guile running a webserver from a makefile
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