Scaleable personal chat system
cd chat-server
go mod download
- Install air for fast reload
- start the server
air --build.cmd "go build -o bin/api ./cmd/server" --build.bin "./bin/api -port=3000 -env=test
wscat -c http://13.203.105.149:1316/v1/chat
-
Install wscat tool
-
Clone the repo and go to chat-server directory
go mod download
go run main.go
-
Run the command -
wscat -c ws://localhost:1316/v1/chat
-
Start chatting
contains config files and setup scripts for prod.
will contain recipes for automating common administrative tasks — like auditing our Go code, building binaries, and executing database migrations.
The internal directory will contain various ancillary packages used by our API. It will contain the code for interacting with our database, doing data validation, sending emails and so on. Basically, any code which isn’t application-specific and can potentially be reused will live in here. Our Go code under cmd/api will import the packages in the internal directory (but never the other way around).
The cmd/api directory will contain the application-specific code. This will include the code for running the server, reading and writing HTTP requests, and managing authentication.