Skip to content

WebSocket Project build by Golang and builted front end app with React.JS

Notifications You must be signed in to change notification settings

alicanli1995/ws-golang-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Observer 👁 Server Side Monitoring Tool

Observer is a server side monitoring tool that allows you to monitor your application in real time. It is written in Go and uses Pusher to send real time notifications to the client.

📖 Table of Contents

You can visualize the data using the Observer Client React project.

🔨 Build

Build in the normal way on Mac/Linux:

go build -o observer cmd/web/*.go

Or on Windows:

go build -o observer.exe cmd/web/.

Or for a particular platform:

env GOOS=linux GOARCH=amd64 go build -o observer cmd/web/*.go

📝 Requirements

observer requires:

  • Postgres 11 or later (db is set up as a repository, so other databases are possible)
  • An account with Pusher, or a Pusher alternative (like ipê)

🚀 Run

First, make sure ipê is running (if you're using ipê):

On Mac/Linux

cd ipe
./ipe 

On Windows

cd ipe
ipe.exe

Then, run the infrastructure:

cd infrastrucutre
docker-compose up -d

Run with flags:

./observer \
-dbuser='postgres' \
-pusherHost='localhost' \
-pusherPort='4001' \
-pusherKey='123abc' \
-pusherSecret='abc123' \
-pusherApp="1" \
-pusherSecure=false

♀ All Flags

Usage of ./observer:
  -db string
        database name (default "observer")
  -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 "observer")
  -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)

📦 Packages

  • pq Driver - PostgreSQL driver for Go
  • Pusher - APIs to enable devs building realtime features
  • ElasticSearch - Open Source, Distributed, RESTful Search Engine
  • ipê - Open source Pusher server implementation compatible with Pusher client libraries written in GO
  • Go-Chi - Lightweight, idiomatic and composable router for building Go HTTP services
  • Cron - Easy to use, in-process cron libraries
  • JWT - JSON Web Tokens for Go

📜 License

This project is licensed under the MIT License - see the LICENSE.md file for details

🙏 Acknowledgments

📚 Further Reading

✍️ Authors

About

WebSocket Project build by Golang and builted front end app with React.JS

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages