In order to build Clutch, the following tools are required:
If you are building on OSX you'll need to install coreutils. This is easiest with homebrew.
Homebrew package manager is recommended for macOS users to manage these dependencies.
If running Clutch in a Docker container is preferred, see the Docker docs.
Start by cloning the Clutch repository and entering into the source directory.
make to build a combined frontend and backend binary. The frontend is configured at build time by clutch.config.js.
Launch Clutch with back-end configuration clutch-config.yaml.
🎉 Clutch should now be accessible from
localhost:8080 in the browser.
Clutch may have external dependencies, to run Clutch with mocked dependencies see Mock Gateway.
Clutch includes a comprehensive
Makefile to simplify the execution of commands related to compiling, testing, and executing tools in the project.
The default target, e.g. running
make in the root of Clutch, builds the frontend first and then packages it into the backend using vfsgen.
The most commonly used
make targets that every Clutch developer should know:
|Re-generate frontend and backend API objects from changes to |
|Compile and start the backend on |
|Build a unified frontend and backend binary and place it in |
|Fix any fixable linting errors. There are also targets for each of API, backend, and frontend, e.g. |
|Run tests. There are also targets for each of backend and frontend, e.g. |