simpleweb/sgnmapper

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

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

sgnodemapper as a service

This project provides an sgnodemapper over http, allowing easy conversion from http to sgn and back again.

Install

Clone this repository from GitHub, then install the dependencies using npm(1).

clone https://github.com/simpleweb/sgnmapper.git
gnmapper
install
Usage
Server

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
Client

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

Copyright Chris Mytton, Simpleweb 2012


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.