https://github.com/teimurjan/go-p2p
Peer-to-peer local network
https://github.com/teimurjan/go-p2p
distributed-file-system go golang peer-to-peer
Last synced: over 1 year ago
JSON representation
Peer-to-peer local network
- Host: GitHub
- URL: https://github.com/teimurjan/go-p2p
- Owner: teimurjan
- Created: 2019-01-11T05:12:23.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-10T04:08:11.000Z (over 3 years ago)
- Last Synced: 2024-06-19T11:16:57.364Z (about 2 years ago)
- Topics: distributed-file-system, go, golang, peer-to-peer
- Language: Go
- Homepage:
- Size: 2.76 MB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 23
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# About
go-p2p - is a peer-to-peer network targeting on the local network in order to have a distributed file system inside the companies.
# Installation
## Docker
The app is dockerized so it can be started using [Docker](https://docs.docker.com/docker-for-mac/install/) and [Docker Compose](https://docs.docker.com/compose/install/).
If you have the tools installed on your machine, create `.env` file by example file `.env.example` and type:
### Development
```sh
docker-compose -f docker-compose.dev.yml up -d
```
### Production
```sh
docker-compose -f docker-compose.prod.yml up -d
```
## Locally
If you need to run the app without docker, you will need [Go](https://golang.org/doc/install), [Dep](https://golang.github.io/dep/) and [Node](https://nodejs.org/en/download/).
After the tools installation:
### Backend setup
```sh
dep ensure
```
to install all Go dependencies.
Create `.env` file like in [Docker](##Docker) section and run it:
```sh
go run main.go
```
### Testing broadcast
* Using netcat: ```./broadcast_udp.netcat.sh -m "{\"ID\":1}" -p 3333```
* Using socat: ```./broadcast_udp.socat.sh -m "{\"ID\":1}" -p 3333```
### GUI setup
```sh
cd gui
npm i
npm run start
```