https://github.com/tsawler/vigilate
The source code for the second project in the course "Working with websockets in Go"
https://github.com/tsawler/vigilate
go golang pusher websockets
Last synced: 5 months ago
JSON representation
The source code for the second project in the course "Working with websockets in Go"
- Host: GitHub
- URL: https://github.com/tsawler/vigilate
- Owner: tsawler
- License: mit
- Created: 2021-02-04T21:48:05.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-05-20T17:27:09.000Z (about 2 years ago)
- Last Synced: 2024-06-19T12:24:52.933Z (about 2 years ago)
- Topics: go, golang, pusher, websockets
- Language: CSS
- Homepage: https://www.udemy.com/course/working-with-websockets-in-go/?referralCode=F29D49FAF002E0A94F44
- Size: 75.5 MB
- Stars: 28
- Watchers: 3
- Forks: 13
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://raw.githubusercontent.com/tsawler/goblender/master/LICENSE)
[](https://golang.org)
[](https://goreportcard.com/report/github.com/tsawler/vigilate)
# Vigilate
This is the source code for the second project in the Udemy course Working with Websockets in Go (Golang).
A dead simple monitoring service, intended to replace things like Nagios.
## Build
Build in the normal way on Mac/Linux:
~~~
go build -o vigilate cmd/web/*.go
~~~
Or on Windows:
~~~
go build -o vigilate.exe cmd/web/.
~~~
Or for a particular platform:
~~~
env GOOS=linux GOARCH=amd64 go build -o vigilate cmd/web/*.go
~~~
## Requirements
Vigilate requires:
- Postgres 11 or later (db is set up as a repository, so other databases are possible)
- An account with [Pusher](https://pusher.com/), or a Pusher alternative
(like [ipê](https://github.com/dimiro1/ipe))
## Run
First, make sure ipê is running (if you're using ipê):
On Mac/Linux
~~~
cd ipe
./ipe
~~~
On Windows
~~~
cd ipe
ipe.exe
~~~
Run with flags:
~~~
./vigilate \
-dbuser='tcs' \
-pusherHost='localhost' \
-pusherPort='4001' \
-pusherKey='123abc' \
-pusherSecret='abc123' \
-pusherApp="1" \
-pusherSecure=false
~~~~
## All Flags
~~~~
tcs@grendel vigilate-udemy % ./vigilate -help
Usage of ./vigilate:
-db string
database name (default "vigilate")
-dbhost string
database host (default "localhost")
-dbport string
database port (default "5432")
-dbssl string
database ssl setting (default "disable")
-dbuser string
database user
-domain string
domain name (e.g. example.com) (default "localhost")
-identifier string
unique identifier (default "vigilate")
-port string
port to listen on (default ":4000")
-production
application is in production
-pusherApp string
pusher app id (default "9")
-pusherHost string
pusher host
-pusherKey string
pusher key
-pusherPort string
pusher port (default "443")
-pusherSecret string
pusher secret
-pusherSecure
pusher server uses SSL (true or false)
~~~~