Skip to content

Template repository for anycable-go based applications

Notifications You must be signed in to change notification settings

anycable/anycable-go-scaffold

Repository files navigation

AnyCable Go scaffold

This is a template repository containing a scaffolding code to build real-time Go applications on top of AnyCable.

Why building a WebSocket application with AnyCable (and not other Go libraries)?

  • Connect your application to Ruby/Rails/JS/whatever apps with ease by using AnyCable RPC protocol.
  • Many features out-of-the-box including different pub/sub adapters (including embedded NATS), built-in instrumentation.
  • Bulletproof code, which has been used production for years.

Read more about AnyCable.

Examples

Installation

Clone this repository:

git clone --depth 1 https://github.com/anycable/anycable-go-scaffold my-cable-project

Run the following command to set up the project:

make init

It would rename the project from anycable/mycable to whatever name you want (<org>/<project>) updating the go.mod, *.go files, etc.

Development

NOTE: Make sure Go 1.23+ installed.

The following commands are available:

# Build the Go binary (will be available in dist/twilio-anycable)
make

# Run Golang tests
make test

We use golangci-lint to lint Go source code:

make lint

Git hooks

To automatically lint and test code before commits/pushes it is recommended to install Lefthook:

brew install lefthook

lefthook install

About

Template repository for anycable-go based applications

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published