Skip to content

Commit bb418e1

Browse files
authored
Merge pull request #7 from tasnimzotder/dev
Update codes
2 parents a01538c + ca7f913 commit bb418e1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+2222
-2391
lines changed

.DS_Store

0 Bytes
Binary file not shown.

.github/workflows/cd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: CD
22

33
on:
44
push:
5-
branches: [ 'main', 'dev' ]
5+
branches: ['main']
66

77
jobs:
88
server_test:

.idea/.gitignore

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,10 @@ Terminal chat application for developers. Share texts and files between users (o
2222

2323
## Installation
2424

25-
Git clone the repository and run the following commands:
26-
2725
1. For Mac and Linux:
2826

2927
```bash
30-
sudo sh install.sh
31-
```
32-
33-
This will build the application and copy the executable to /usr/local/bin directory.
34-
35-
2. For Windows: (using PowerShell)
36-
37-
```bash
38-
.\install.ps1
28+
curl https://raw.githubusercontent.com/tasnimzotder/tchat/main/install.sh | sudo sh
3929
```
4030

4131
## Usage
@@ -55,23 +45,23 @@ tchat conn
5545
## Commands
5646

5747
| Command | Description | Example |
58-
| ------- | ------------------------ | --------------------------------------- |
48+
|---------|--------------------------|-----------------------------------------|
5949
| `conn` | Start or save connection | `tchat conn` |
6050
| `msg` | Receive messages | `tchat msg -d 1 -s hello.txt` |
6151
| `send` | Send messages | `tchat send -r <receiver> -m <message>` |
6252

6353
### Message Command
6454

6555
| Option | Description | Example |
66-
| ------ | -------------------------------- | ----------------------------- |
56+
|--------|----------------------------------|-------------------------------|
6757
| -c | Clear the messages | `tchat msg -c all` |
6858
| -d | Display a message (serialNumber) | `tchat m -d 2` |
6959
| -s | Save a message to file | `tchat msg -d 2 -s hello.txt` |
7060

7161
### Send Command
7262

7363
| Option | Description | Example |
74-
| ------ | ----------- | --------------------------------------- |
64+
|--------|-------------|-----------------------------------------|
7565
| -r | Receiver | `tchat send -r <receiver> -m <message>` |
7666
| -m | Message | `tchat send -r <receiver> -m <message>` |
7767
| -f | File | `tchat send -r <receiver> -f <file>` |

ansible/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
ansible-install:
1+
ansible-setup:
22
ansible-playbook playbooks/setup.yml -i inventory.yml -vv
33

4-
ansible-install-dry:
4+
ansible-setup-dry:
55
ansible-playbook playbooks/setup.yml -i inventory.yml -vvvv --check
66

77
ansible-deploy-files:

ansible/playbooks/firewall.yml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,6 @@
2323
rule: 'allow'
2424
comment: 'HTTPS'
2525

26-
- proto: 'tcp'
27-
port: '8080'
28-
src: '0.0.0.0/0'
29-
rule: 'allow'
30-
comment: 'HTTP'
31-
3226
- proto: 'tcp'
3327
port: '3000'
3428
src: '0.0.0.0/0'
@@ -41,18 +35,6 @@
4135
rule: 'allow'
4236
comment: 'DNS'
4337

44-
- proto: 'tcp'
45-
port: '5050'
46-
src: '0.0.0.0/0'
47-
rule: 'allow'
48-
comment: 'temporary api port'
49-
50-
- proto: 'tcp'
51-
port: '9001'
52-
src: '0.0.0.0/0'
53-
rule: 'allow'
54-
comment: 'portainer'
55-
5638
pre_tasks:
5739
- name: Install UFW
5840
ansible.builtin.apt:

client/.gitignore

Lines changed: 0 additions & 154 deletions
This file was deleted.

client/Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1+
build_dev:
2+
go build -o bin/tchat main.go
3+
14
build:
25
GOOS=linux GOARCH=amd64 go build -o bin/tchat.linux.amd64 main.go
6+
GOOS=linux GOARCH=arm64 go build -o bin/tchat.linux.arm64 main.go
37
GOOS=darwin GOARCH=arm64 go build -o bin/tchat.darwin.arm64 main.go
48
GOOS=windows GOARCH=amd64 go build -o bin/tchat.windows.amd64.exe main.go
59

610
bin:
7-
sudo cp bin/tchat /usr/local/bin/
11+
sudo cp bin/tchat /usr/local/bin/tchat
812

913
test:
1014
go test -v -count=1 ./... -cover

0 commit comments

Comments
 (0)