mirror of
https://github.com/SunRed/haste-server.git
synced 2024-11-23 17:50:19 +01:00
Remove haste client
This commit is contained in:
parent
44350ce9e6
commit
bece4598f7
2 changed files with 0 additions and 26 deletions
1
TODO
1
TODO
|
@ -1,5 +1,4 @@
|
|||
cache headers for static assets
|
||||
|
||||
tests
|
||||
|
||||
# shared version only
|
||||
|
|
25
haste
25
haste
|
@ -1,25 +0,0 @@
|
|||
#! /usr/bin/env ruby
|
||||
|
||||
require 'restclient'
|
||||
require 'json'
|
||||
|
||||
# Get the data
|
||||
data = STDIN.readlines.join
|
||||
data.strip!
|
||||
|
||||
# if there is no data, stop
|
||||
if data == ''
|
||||
puts 'no input given'
|
||||
exit 1
|
||||
end
|
||||
|
||||
# Decide on a server
|
||||
server = ENV['HASTE_SERVER'] || 'http://localhost:7777'
|
||||
server.chop! if server.end_with?('/')
|
||||
|
||||
# Send the data up
|
||||
back = RestClient.post "#{server}/documents", data
|
||||
data = JSON.parse(back)
|
||||
|
||||
# Output the url
|
||||
puts "#{server}/#{data['key']}"
|
Loading…
Reference in a new issue