This is an Express-based application server written in TypeScript. It uses GraphQL via Apollo to communicate with the client, and also supports classic REST endpoints.
Install dependencies with Yarn:
$ yarn
This should install the ReasonML and BuckleScript platform to compile the code to JavaScript.
To use Postgres locally:
$ createuser -s api-user
$ createdb api-example -O api-user
$ yarn db.migrate
To run in development, use a TypeScript watcher on a separate tab first:
$ yarn build.ts.watch
Then run the server in development mode:
$ yarn dev
The core of the application is an Express server with some middleware: