Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kuredoro/files
a simple file server written in Go.
https://github.com/kuredoro/files
compression file-server server toy-project
Last synced: about 1 month ago
JSON representation
a simple file server written in Go.
- Host: GitHub
- URL: https://github.com/kuredoro/files
- Owner: kuredoro
- License: bsd-3-clause
- Created: 2020-09-16T14:01:03.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-12-01T08:55:22.000Z (about 3 years ago)
- Last Synced: 2024-11-30T18:47:23.558Z (about 1 month ago)
- Topics: compression, file-server, server, toy-project
- Language: Go
- Homepage:
- Size: 12.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# files
A simple **FILE S**erver written in Go.
### Run it!
The server will store the files it receives to the current working directory. You also need to pass a port number on which the server should listen incoming connections. To run the server
```
$ go run cmd/server/*
```The client expects a name of the file and the server's address as its arguments. Build the client first
```
$ go build cmd/client/*
$ ./client test.txt localhost:8888
```If a file with the same name already exists in current working directory, the file will be renamed. For example `name.ext` will be renamed to `name_copy2.ext`. The server takes care of tracking down the "copies" of the files, such that you can restart the server at any time and the copy numbers will be correctly increased with no files overwritten accidentally.