authenticated user example

This commit is contained in:
Radek Stepan 2012-05-22 15:40:35 +01:00
parent aef0995d65
commit 2558a422eb

View File

@ -22,7 +22,13 @@ http.createServer((req, res) ->
# Callback url from GitHub login.
else if uri.pathname is "/auth"
github.auth.login qs.parse(uri.query).code, (err, token) ->
console.log token
console.log github.client()
# Build client from access token provided.
#client = github.client token
#client.get "/user", (err, status, body) ->
# console.log body
res.writeHead 200,
"Content-Type": "text/plain"