-
Notifications
You must be signed in to change notification settings - Fork 0
1. Installation
EasyREST now ships as a single, all‑in‑one binary (easyrest-server
) that embeds all official plugins and runs significantly faster by avoiding external plugin RPC overhead. If you prefer a gateway mode (to load only specific or custom plugins), use the easyrest-gateway
binary and install plugins alongside it.
-
Detect your platform & architecture:
uname -m && uname -s
-
x86_64
→amd64
-
aarch64
→arm64
-
Linux
→linux
-
MacOS
→darwin
-
-
Set the
BIN_ARCH
:export BIN_ARCH="$(uname -s | tr '[:upper:]' '[:lower:]')-$(uname -m)" # e.g. linux-amd64
-
Download
easyrest-server
:curl -L -o easyrest-server \ https://github.com/onegreyonewhite/easyrest/releases/latest/download/easyrest-server-$BIN_ARCH
-
Make it executable:
chmod +x easyrest-server
-
Move to your
PATH
:INSTALL_DIR="$HOME/.local/bin" # or /usr/local/bin mkdir -p "$INSTALL_DIR" mv easyrest-server "$INSTALL_DIR/"
-
Verify installation:
which easyrest-server easyrest-server --version
Use gateway mode when you need to load only certain plugins (e.g., deploy a MySQL‑only service) or add custom plugins.
curl -L -o easyrest-gateway \
https://github.com/onegreyonewhite/easyrest/releases/latest/download/easyrest-gateway-$BIN_ARCH
chmod +x easyrest-gateway
All plugins now live in the same repository. Replace PLUGIN
with one of:
sqlite
, mysql
, postgres
, redis
.
for PLUGIN in sqlite mysql postgres redis; do
curl -L -o easyrest-plugin-$PLUGIN \
https://github.com/onegreyonewhite/easyrest/releases/latest/download/easyrest-plugin-$PLUGIN-$BIN_ARCH
chmod +x easyrest-plugin-$PLUGIN
done
Move gateway & plugins into your PATH
:
mv easyrest-gateway \
easyrest-plugin-sqlite \
easyrest-plugin-mysql \
easyrest-plugin-postgres \
easyrest-plugin-redis \
"$INSTALL_DIR/"
Verify:
easyrest-gateway --version
easyrest-plugin-mysql --version
- Common targets:
-
/usr/local/bin
(requiressudo
) -
$HOME/.local/bin
(nosudo
)
-
- Ensure your
PATH
includes the install directory:export PATH="$INSTALL_DIR:$PATH"
- Configure your database connections via YAML or environment variables.
-
Start the server:
-
All‑in‑One:
easyrest-server --config config.yaml
-
Gateway:
easyrest-gateway --config config.yaml
-
All‑in‑One:
-
Explore the auto‑generated Swagger schema at
http://localhost:8080/api/{plugin}/
.
🚀 You’re now ready to serve RESTful CRUD endpoints on SQLite, MySQL, PostgreSQL and cache with Redis!