letsgochat

command module
v0.0.0-...-b3fea43 Latest Latest
Warning

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

Go to latest
Published: May 24, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

README


Let's Go Chat

go version license Go Reference

⚡ Quick start

First of all, download and install Go. Version 1.17 or higher is required.

⚙ Config (.env)

Create .env file and add the value as in example.

Name Type Example value
HOST_NAME string localhost
PORT int 8080
POSTGRES_URL string postgres://postgres:root@localhost:5432/letsgochat

🧩 How to run

  1. Clone project
git clone https://github.com/kokhno-nikolay/letsgochat.git
  1. Start docker-compose
go run main.go

‍🚀 API

URL - baseURL/v1/

  1. Registration
POST https://letsgochat.herokuapp.com/user -H 'Content-Type: application/json' -d '{"username":"someusername","password":"random-password"}'
  1. Login
POST https://letsgochat.herokuapp.com/user/login -H 'Content-Type: application/json' -d '{"username":"someusername","password":"random-password"}'
  1. Active
GET https://letsgochat.herokuapp.com/user/active -H 'Content-Type: application/json
  1. Websocket chat
ws://letsgochat.herokuapp.com/chat?token=<token>

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package docs GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag
Package docs GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag
pkg
hasher
Package hasher provides hashing and password hash comparison.
Package hasher provides hashing and password hash comparison.
mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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