https://github.com/thomasheller/curlinator
URL download helper service
https://github.com/thomasheller/curlinator
Last synced: about 2 months ago
JSON representation
URL download helper service
- Host: GitHub
- URL: https://github.com/thomasheller/curlinator
- Owner: thomasheller
- License: apache-2.0
- Created: 2019-12-14T09:58:54.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-12-14T12:41:18.000Z (over 5 years ago)
- Last Synced: 2023-08-03T13:13:43.600Z (almost 2 years ago)
- Language: Go
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# curlinator
URL download helper service
## Setup
### Prerequisites
Install Go for your platform: https://golang.org
I recommend gimme: https://github.com/travis-ci/gimme
```
mkdir -p ~/bin
curl -sL -o ~/bin/gimme https://raw.githubusercontent.com/travis-ci/gimme/master/gimme
chmod +x ~/bin/gimme
```### Download
Clone this repository into the `src` directory of your
[`$GOPATH`](https://golang.org/doc/code.html#GOPATH)
(default: `~/go/src`):```
git clone https://github.com/thomasheller/curlinator ~/go/src/github.com/thomasheller/curlinator
```### Build
```
eval $(~/bin/gimme stable)
cd ~/go/src/github.com/thomasheller/curlinator
go get
go build
```### Deploy as systemd service
- Put the `curlinator` binary in `/usr/local/bin`
- Put the `curlinator.service` file in `/lib/systemd/system`
- Add user and group `curlinator` and create the `/var/curlinator` directory (`useradd -U -m -d /var/curlinator curlinator`)Enable service:
```
systemctl enable curlinator
service curlinator start
service curlinator status
```## Usage
```
curl -d '{"url":"https://www.example.com"}' 'http://localhost:8000/add'curl -d '{"url":"https://www.example.com"}' 'http://localhost:8000/delete'
curl 'http://localhost:8000/list'
curl 'http://localhost:8000/status'
```Downloaded URLs will appear in `/var/curlinator`.
Use `journalctl -fu curlinator` to follow systemd logs.