Follow the instructions here to get setup using Oasis, replacing the text marked in red with information specific to your project.
Once you are done, head on over to the tutorial to learn more about how Oasis works.
bash -c "sh <(curl -fsSL https://opam.ocaml.org/install.sh)"
opam install dune
The following steps will pull in the starter template and then rename some things to suit your project.
git clone git@github.com:etopiei/oasis.git your_project_name
cd your_project_name
rm -rf .git
opam install . --deps-only
dune exec setup
Setting up the database can be quite involved, and vary from project to project. If you're not sure how to setup postgres and would like a fast way to get started, run docker with postgres using:
docker run --name oasis-postgres -e \
POSTGRES_PASSWORD=mysecretpassword \
-p 5432:5432 -d postgres
Next you'll need to edit the `db_params` variable in the file bin/config/oasis_conf.ml to point to
your
postgresql database.
(If you used the docker command the only thing you'll have to change is the password.)
Now with your database details configured you can test the connection and create the database in postgres with:
dune exec migrate create
You're almost ready to go now! Build the frontend with:
dune build lib/webapp/webapp.js
And lastly run the server with:
dune exec your_project_name -w
This will start the server at: http://localhost:8080/index.html
So go check it out!
If all is well, you'll see a welcome screen and from there can start making changes to
your
project.
If there are any problems, feel free to create an issue on the Oasis github.