https://github.com/ecomclub/symlinks-api
HTTP interface written in Go to create and delete symbolic links
https://github.com/ecomclub/symlinks-api
go golang rest-api symbolic-links
Last synced: about 1 month ago
JSON representation
HTTP interface written in Go to create and delete symbolic links
- Host: GitHub
- URL: https://github.com/ecomclub/symlinks-api
- Owner: ecomclub
- License: mit
- Created: 2018-01-23T01:53:43.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-25T00:10:27.000Z (over 7 years ago)
- Last Synced: 2025-01-23T08:33:14.375Z (3 months ago)
- Topics: go, golang, rest-api, symbolic-links
- Language: Go
- Size: 20.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# symlinks-api
HTTP interface written in Go to create and delete symbolic links# Technology stack
+ [Go](https://golang.org/) 1.9.x# Setting up
For security, we recommend to download and install the app as root,
and let the files owned by `root:root` as default.```bash
sudo git clone https://github.com/ecomclub/symlinks-api.git
cd symlinks-api
sudo go build main.go
```Start application with CLI arguments:
+ Root directory to static files
+ HTTP/TCP port
+ X-Authentication header password
+ Optional log file pathExample:
```bash
./main /var/www :3000 xyz /var/log/app.log &
``````bash
curl -H 'X-Authentication: xyz' 'http://127.0.0.1:3000/create?newname=foo&oldname=bar'
curl -H 'X-Authentication: xyz' 'http://127.0.0.1:3000/delete?newname=foo'
```