Js_of_ocaml + React codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the RealWorld spec and API.
This codebase was created to demonstrate a fully fledged fullstack application built with Js_of_ocaml and jsoo-react including CRUD operations, authentication, routing, pagination, and more.
For more information on how to this works with other frontends/backends, head over to the RealWorld repo.
Basically its just like React single-page-application but written in OCaml with React.
- Using Webpack as the frontend build tool
- Using Opam as OCaml package manager, Yarn as JavaScript package manager
- Using Dune as OCaml code build tool
- Routing - jsoo-react Router
You will need to install both Opam and Yarn package managers.
To get the project running locally:
git clone https://github.com/jchavarri/jsoo-react-realworld-example-app.git
cd jsoo-react-realworld-example-app
yarn install # install JavaScript dependencies
make create-switch # create Opam local switch
make init # install OCaml dependencies
make build # build OCaml sources, generate JavaScript
make start # bundle with Webpack, start dev web server
Then open http://localhost:8000 to see your app.
This project was adapted from https://github.com/jihchi/rescript-react-realworld-example-app by @jihchi.