1
0
Fork 0
mirror of https://github.com/vbatts/imgsrv.git synced 2024-11-27 18:45:40 +00:00
This commit is contained in:
Vincent Batts 2013-08-05 20:33:50 -04:00
parent 6a5fb3ff22
commit 25f42cf2be

View file

@ -17,36 +17,38 @@ For a basic start, make sure mongo is running on the localhost, and run:
For something a bit more complicated, like an openshift diy-0.1 cartridge, For something a bit more complicated, like an openshift diy-0.1 cartridge,
set your .openshift/action_hooks/start to: set your .openshift/action_hooks/start to:
nohup ${OPENSHIFT_REPO_DIR}/bin/server \
-server \ nohup ${OPENSHIFT_REPO_DIR}/bin/server \
-ip ${OPENSHIFT_INTERNAL_IP} \ -server \
-port 8080 \ -ip ${OPENSHIFT_INTERNAL_IP} \
-mongo-host ${OPENSHIFT_NOSQL_DB_URL} \ -port 8080 \
>> ${OPENSHIFT_LOG_DIR}/server.log 2>&1 & -mongo-host ${OPENSHIFT_NOSQL_DB_URL} \
>> ${OPENSHIFT_LOG_DIR}/server.log 2>&1 &
Client side: Client side:
Either pass the -remotehost flag pointing to your server instance Either pass the -remotehost flag pointing to your server instance
imgsrv -remotehost http://hurp.til.derp.com:7777 -put ./lolz.gif -keywords 'cats,lols' imgsrv -remotehost http://hurp.til.derp.com:7777 -put ./lolz.gif -keywords 'cats,lols'
or setup your ~/.imgsrv.yaml, with a the value 'remotehost', like so: or setup your ~/.imgsrv.yaml, with a the value 'remotehost', like so:
---
remotehost: http://hurp.til.derp.com:7777 ---
remotehost: http://hurp.til.derp.com:7777
then you can drop that flag out, for quicker lolzing: then you can drop that flag out, for quicker lolzing:
imgsrv -put ./lolz.gif -keywords 'cats,lols' imgsrv -put ./lolz.gif -keywords 'cats,lols'
2013/02/12 13:00:28 POSTing: http://hurp.til.derp.com:7777/f/?filename=lolz.gif&keywords=cats,lols 2013/02/12 13:00:28 POSTing: http://hurp.til.derp.com:7777/f/?filename=lolz.gif&keywords=cats,lols
2013/02/12 13:00:29 New Image!: http://hurp.til.derp.com:7777/f/lolz.gif 2013/02/12 13:00:29 New Image!: http://hurp.til.derp.com:7777/f/lolz.gif
Dependencies Dependencies
------------ ------------
go get launchpad.net/goyaml go get launchpad.net/goyaml
go get labix.org/v2/mgo go get labix.org/v2/mgo
and put this imgsrv in your GOPATH, and put this imgsrv in your GOPATH,
since it references itself. since it references itself.
@ -56,13 +58,14 @@ Building
Either Either
git clone git://<host>/imgsrv.git git clone git://<host>/imgsrv.git
cd imgsrv cd imgsrv
go build go build
./imgsrv ./imgsrv
or or
go get github.com/vbatts/imgsrv go get github.com/vbatts/imgsrv
imgsrv