Name: sgnmapper
Owner: Simpleweb
Description: sgnodemapper as a service
Created: 2012-06-07 10:56:45.0
Updated: 2016-05-02 15:47:43.0
Pushed: 2012-06-07 11:14:23.0
Homepage: http://sgnmapper.herokuapp.com/
Size: 100
Language: CoffeeScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This project provides an sgnodemapper over http, allowing easy
conversion from http
to sgn
and back again.
Clone this repository from GitHub, then install the dependencies using
npm(1)
.
clone https://github.com/simpleweb/sgnmapper.git
gnmapper
install
To start the server on port 3000 you can run:
de_modules/.bin/coffee server.coffee
Alternativly you can use foreman to manage running the application processes, this will start them on port 5000.
man start
To convert an http url to an sgn url, provide the url as a parameter,
with curl(1)
it would look something like:
rl -s http://localhost:3000/ -d 'url=http://twitter.com/hecticjeff'
l":"http://twitter.com/hecticjeff","sgn":"sgn://twitter.com/?ident=hecticjeff","sgnParsed":{"domain":"twitter.com","keyName":"ident","value":"hecticjeff"}}
To convert from sgn url back to http, provide an sgn
parameter:
rl -s http://localhost:3000/ -d 'sgn=sgn://twitter.com/?ident=hecticjeff'
l":"http://twitter.com/hecticjeff","sgn":"sgn://twitter.com/?ident=hecticjeff","sgnParsed":{"domain":"twitter.com","keyName":"ident","value":"hecticjeff"}}
Copyright Chris Mytton, Simpleweb 2012