go-messenger-demo
go-messenger-demo copied to clipboard
Demo Messenger Application
Go Messenger App Demo
Source code of the blog posts "Building a Messenger App":
- Part 1: Schema
- Part 2: OAuth
- Part 3: Conversations
- Part 4: Messages
- Part 5: Realtime Messages
- Part 6: Development Login
- Part 7: Access Page
- Part 8: Home Page
- Part 9: Conversation Page
Get the code:
go get -u github.com/nicolasparada/go-messenger-demo
Copy the example .env
file:
cp .env.example .env
Now, modify it with your own GitHub client ID and secret. In the Github page, set a callback URL like so http://localhost:3000/api/oauth/github/callback
.
Start database instance:
cockroach start-single-node --insecure --host 127.0.0.1
Create database schema, build and run:
cat schema.sql | cockroach sql --insecure
go build -o messenger
./messenger