chat-app-go

command module
v0.0.0-...-3ec8cfb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2024 License: MIT Imports: 6 Imported by: 0

README

Go Chat Application

This Go chat application provides real-time communication between users through websockets. It's built using the Go programming language and leverages the gorilla/websocket package for managing websocket connections. The application is designed to be simple, efficient, and easy to deploy and run.

image

Features

  • Real-time chat communication.
  • Simple and intuitive user interface.
  • Supports multiple users simultaneously.

Prerequisites

Before you run or deploy the chat application, ensure you have the following installed:

  • Go (version 1.13 or later recommended)
  • Access to a terminal or command line interface

Getting Started

To get the chat application running locally, follow these steps:

  1. Clone the repository

    First, clone this repository to your local machine using Git.

    git clone https://github.com/matheuspolitano/chat-app-go.git
    cd chat-app-go
    
  2. Run the application

    From the root of your project directory, run the application using the go run command. This will start the server on the default port 8080.

    go run main.go
    

    Optionally, you can specify a different port by providing it as an argument:

    go run main.go 8081
    
  3. Access the chat application

    Open your web browser and go to http://localhost:8080 (or the port you specified). You should see the chat application's user interface.

Deploying to a Server

To deploy the chat application to a server, follow these general steps. Note that specific steps may vary based on your hosting provider and server configuration.

  1. Build the application

    Compile your application to a binary for your server's OS and architecture.

    go build -o chat-app
    
  2. Transfer the binary and resources

    Transfer the compiled binary and any necessary resources (like the public directory, if you have a frontend component) to your server.

  3. Run the application

    On your server, start the application. You might want to use a process manager like systemd or supervisord to keep your application running after closing the terminal.

    ./chat-app
    

    Ensure the server's firewall rules allow traffic on the port your application is listening on.

Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request.

License

Specify your license here or indicate that it's available in the LICENSE file at the root of the repository.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL