Browse Source

Expand readme

master
Christian Fischer 3 months ago
parent
commit
751e2b3c4f
1 changed files with 28 additions and 10 deletions
  1. +28
    -10
      readme.org

+ 28
- 10
readme.org View File

@@ -2,25 +2,43 @@

** Dependencies and starting the proxy

The only dependencies are "redis-rkt" and "threading", as defined in
info.rkt.
The only dependencies are "redis-rkt" and "threading", and they
can be installed using raco:

The REST server can be started by running server/rest.rkt:
#+begin_src bash
git clone git@github.com:chfi/gn-proxy.git
cd gn-proxy
raco pkg install
#+end_src

The REST server can then be started by running server/rest.rkt:

#+begin_src bash
racket server/rest.rkt
#+end_src

By default it listens on port 8080 and listens on 127.0.0.1, which
can be changed in ~server/rest.rkt~:

#+begin_src racket
(define stop
(serve
#:dispatch (sequencer:make
(filter:make #rx"^/available/"
query-available-dispatcher)
(filter:make #rx"^/run-action/"
run-action-dispatcher))
#:listen-ip "127.0.0.1"
#:port 8080))
#+end_src

** Redis and MariaDB connections
The Redis and MariaDB connections are handled in ~server/db.rkt~, and
can be configured by editing ~connect-redis~ and ~connect-sql~. See the
documentation for the respective packages for more information, if needed:

The database connections are defined in db.rkt, and are handled by
the ~redis~ and ~db~ packages respectively. Right now they are
configured in code, not by a config file.
- Redis: https://docs.racket-lang.org/redis@redis-doc/client.html
- SQL: https://docs.racket-lang.org/db/connect.html

Docs:
- https://docs.racket-lang.org/redis@redis-doc/index.html
- https://docs.racket-lang.org/db/connect.html

** Resources



Loading…
Cancel
Save