- Live Site
- Live Site -
209.38.172.39
- Dev Site - Digital Ocean DNS
- Dev Site - Pretty URL
- Source code
- Source code mirror
- Project and library documentation
- Development Workflow
- How to develop
reformer.fyi
- Video
- How to develop
This site runs on two ports in the production container, but one in local development.
Locally, the site is at http://localhost:8080
In a container, http://localhost:80
is the nginx entrypoint.
If nginx is broken, use http://localhost:8080
to go directly to the running cfrr
.
To setup a system, root
access is often required. So, if using sudo
:
sudo make setup
And if not:
make setup
- Say you open Emacs
- Open the project
- Change
src/reformer/routing.scm:router
to the following, to simulate a bug
(define (router request request-body)
(log-request request)
(let ((path (uri->string (request-uri request))))
(cond
((string=? "/feed" path)
(set! visits (+ visits 1))
(home:index visits))
((string=? "/" path)
(set! visits (+ visits 1))
(feed:index))
((string=? "/about" path)
(set! visits (+ visits 1))
(about:index))
(else
(not-found request)))))
- Run
M-x compile
and executemake -k run-with-repl
- Run
M-x geiser-connect
, default host, port1689
- Go to
http://localhost:8080
and notice the incorrect pages. - Change the routing function back to what it was.
(define (router request request-body)
(log-request request)
(let ((path (uri->string (request-uri request))))
(cond
((string=? "/" path)
(set! visits (+ visits 1))
(home:index visits))
((string=? "/feed" path)
(set! visits (+ visits 1))
(feed:index))
((string=? "/about" path)
(set! visits (+ visits 1))
(about:index))
(else
(not-found request))))) ;; Run C-x C-e on this form
make run
After that, you should be able to use
make lb run
make container-build container-run
or using bash magic
make container-{build,run}
make container-run
will live load the relevant application code from your git repo into the container, via a volume,
allowing for live reloads.