Table of Contents
This system is using for Amartha - Shorty Challenge.
This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.
-
I use macOS Catalina 10.15.7
❯ uname -a Darwin 192.168.1.25 19.6.0 Darwin Kernel Version 19.6.0:
-
And then you need to install Golang prefer using homebrew
-
After that check the installation and Golang version it must be above than 1.11 because we need the Golang Modules
> go version go version go1.20.3 darwin/amd64
- Install SQLite with Homebrew
brew install sqlite
- Create the database
sqlite3 chat.db
- Create table
CREATE TABLE messages ( id INTEGER PRIMARY KEY AUTOINCREMENT, sender_id INTEGER NOT NULL, receiver_id INTEGER NOT NULL, message TEXT NOT NULL, created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
);
#### Manual Installation
1. Clone the repo
```sh
git clone https://github.com/jadahbakar/chat-server.git
-
Install Modules packages
go mod tidy
or
go mod download
-
Run it
go run main.go
.
├── README.md
├── assets
│ └── images
│ ├── console.png
│ └── postman.png
├── chat.db
├── go.mod
├── go.sum
└── main.go
3 directories, 7 files