Code Monkey home page Code Monkey logo

chat-app-golang's Introduction

Chat App in Go

Learning Go by building a Chat Application.

Things I learnt

  • Testing and writing code following the TDD approach
  • Rendering HTML templates.
  • Implementing OAuth2 Login (Google, Github and Facebook).
  • Communication via Websockets.
  • Implementing a trace package that monitors all websockets activities(e.g. when a new user joins a chat, when a message is sent e.t.c)
  • Modularising my codebase.

Running the program locally on your computer

  • Make sure you Go installed on your system.
  • Clone this repository in a directory of choice on your computer: git clone https://github.com/Falence/chat-app-golang.git
  • Get personal access keys from the OAuth providers used (google, facebook, github). You can google how to do this.
    This permits us consume their API to have access to users information such as name, profile picture etc.
  • In the chat directory, create a .env file and place these keys in it. See the image below.
    keys
  • Install the 3rd party packages by going into the chat directory and running go mod tidy on your terminal. Same for the trace directory.
  • cd into the chat directory and run go build -o chat to build the program.
  • To run our program, type ./chat.
  • You can now open the Chat App on different browsers: http://localhost:8080/chat
  • You'll be prompted to login.
  • Then you can now chat.

chat-app-golang's People

Contributors

falence avatar

Stargazers

Chukwu Odinaka avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.