Minimal working example of a learn-ocaml source repository.
In the running server, only the exercises that are indexed in src/exercises/index.json will be shown.
- Install Docker
- Open a terminal in this folder (
cd .../learn-ocaml-meetup-demo-repository/
) - Run
./run.sh
- Copy the teacher token that is generated (
X-...-...-...-...
) - Open http://localhost:8080/ then login using your token.
- Open the
Exercises
view. - To stop the server:
- type Ctrl + C from the initial terminal,
- or run
docker stop learn-ocaml-server
from another terminal.
- Clone this repo (
git clone https://github.com/erikmd/learn-ocaml-meetup-demo-repository.git
) - Open a terminal in this folder (
cd .../learn-ocaml-meetup-demo-repository/
) - Run the commands below to:
- Get the
learn-ocaml
binary from the latest release. - Get the
learn-ocaml-www.zip
archive, and unpack it. - Run the server.
- Get the
mkdir server && cd server
curl -fSOL https://github.com/ocaml-sf/learn-ocaml/releases/download/v0.15.0/learn-ocaml-linux-x86_64
curl -fSOL https://github.com/ocaml-sf/learn-ocaml/releases/download/v0.15.0/learn-ocaml-www.zip
unzip learn-ocaml-www.zip
mv learn-ocaml{-linux-x86_64,}
chmod a+x learn-ocaml
./learn-ocaml --contents-dir=learn-ocaml-www --repo=../src
then two folders www
and sync
are created.
mkdir server && cd server
curl -fSOL https://github.com/ocaml-sf/learn-ocaml/releases/download/v0.15.0/learn-ocaml-darwin-x86_64
curl -fSOL https://github.com/ocaml-sf/learn-ocaml/releases/download/v0.15.0/learn-ocaml-www.zip
unzip learn-ocaml-www.zip
mv learn-ocaml{-darwin-x86_64,}
chmod a+x learn-ocaml
xattr -d com.apple.quarantine learn-ocaml
./learn-ocaml --contents-dir=learn-ocaml-www --repo=../src
then two folders www
and sync
are created.
- Copy the teacher token that is generated and shown in the logs (
X-...-...-...-...
) - Open http://localhost:8080/ then login using your token.
- Open the
Exercises
view. - If need be, type Ctrl + C to stop the server.