https://github.com/introvesia/go-chat-api
Chat API with Golang for Introvesia Workspace
https://github.com/introvesia/go-chat-api
Last synced: 8 months ago
JSON representation
Chat API with Golang for Introvesia Workspace
- Host: GitHub
- URL: https://github.com/introvesia/go-chat-api
- Owner: Introvesia
- Created: 2025-02-11T07:52:28.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-11T09:14:31.000Z (over 1 year ago)
- Last Synced: 2025-02-11T09:34:40.295Z (over 1 year ago)
- Language: Go
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# go-chat-api
Chat API server with Golang for Introvesia Workspace
## Prerequisites
- Golang installed
## Preparation for migration tools
Install migration tools:
```bash
brew install golang-migrate
```
Create a new migration:
```bash
migrate create -ext sql -dir migrations -seq
```
## Migrate database
1. Uncomment this code at `main.go`
```go
libs.AutoMigrate()
```
2. Run the server
## Check the module is uninstalled
```bash
go list -m all | grep
```
## Uninstall the module
```bash
go mod tidy
```
## Hot reload
Install `air`:
```bash
go install github.com/air-verse/air@latest
```
Add this code after edit profile use command `nano ~/.bashrc`:
```bash
export PATH=$PATH:$(go env GOPATH)/bin
```
Run `main.go` with this command:
```bash
air
```