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

Rename the project from anycable/mycable to <org>/<project> (go.mod, *.go files, etc.).

Make sure everything is ready by running make lint and make test.

Development

NOTE: Make sure Go 1.21+ 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