For more information on how to this works with other frontends/backends, head over to the RealWorld repo.
The purpose of this repo is to showcase a realworld example of how rescript can integrate a typescript codebase in order to ease its adoption (... and get the best of both worlds ?).
This project uses hexagonal architecture
Rescript is mainly used for domain modelling (domain & usecases)
TypeScript is used for adapters implementation
.res & .resi are rescript files, they are normally built directly to javascript, ending up directly in the ./lib/js/ folder (not committed)
But rescript can also generate typescript files next to the rescript files containing some @genType decorators. These new files have a .gen.ts extension
Pure typescript files use the standard .ts extension and can make use of the .gen.ts previously generated for interop between the two languages (to get types).
Both .gen.ts & .ts files are built using tsc and will end up as javascript files in the ./lib/js/ folder
npm install, npm build
npm run start
curl -XPOST -v localhost:3000/ -d '{"mail": "[email protected]", "name": "salut", "password": "myPass"}' -H "Content-Type: application/json"

