This page walks you through the initial steps of getting setup with RapidRows.
RapidRows is a single binary executable without any dependencies, and as such
requires no installation other than placing it in your
$PATH. It is a
The easiest way to get the binary is to download the latest stable release from the
GitHub releases page for your
platform. Unpack the tarball and copy the
rapidrows executable to wherever
$ rapidrows --help Usage: rapidrows [options] config-file RapidRows is a single-binary configurable API server. Options: -c, --check only check if the config file is valid -l, --logtype string print logs in 'text' (default) or 'json' format (default "text") --no-color do not colorize log output -v, --version show version and exit -y, --yaml config-file is in YAML format (c) RapidLoop, Inc. 2022 * https://rapidrows.io
If there is no binary for your platform, you can build RapidRows yourself.
Building it yourself
To build the binary yourself, first ensure you have working Go and C compilers. Go v1.18 or above is required. A modern gcc or clang should suffice as the C compiler.
To download and compile in one step, do:
go install github.com/rapidloop/rapidrows/cmd/rapidrows@latest
The executable will be present in
$GOPATH/bin or (if $GOPATH is not set, as
is usually the case) in
Starting the server
To start the RapidRows server, you need a configuration file. Here is a sample one:
version: '1' listen: '127.0.0.1:8080' endpoints: - uri: /hello implType: static-text script: 'world!'
Copy this to a file called
Before starting the server, check the configuration once:
$ rapidrows --check --yaml hello.yaml
--check option tells
rapidrows to only check the file and report
any errors or warnings. No output means all is well.
Since our config file is in YAML syntax, we’ve added the
--yaml option also.
rapidrows will assume the file is in JSON format.
Now start the server with:
$ rapidrows -y hello.yaml 2022-09-24 10:10:57.261 INF API server started successfully listen=127.0.0.1:8080
The server is running now, and you can see if it is working by browsing to localhost:8080, or using curl:
$ curl http://localhost:8080/hello world!
To stop the server, hit
$ rapidrows -y hello.yaml 2022-09-24 10:10:57.261 INF API server started successfully listen=127.0.0.1:8080 ^C2022-09-24 10:12:22.643 INF stop request received, shutting down timeout=60000 2022-09-24 10:12:22.643 INF API server stopped
You can find lots of examples here in the documentation if you’d like to play around with it right away, or read the user’s guide for detailed explanations of the features.
Stuck? Questions? Feeback?
For help or general questions, use the GitHub discussions page. If you think you’ve found a bug, raise an issue here. Feel free to reach out to us directly via email (firstname.lastname@example.org) or Twitter (@therapidloop).