Skip to content

Instantly share code, notes, and snippets.

guiomie

Block or report user

Report or block guiomie

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@fwielstra
fwielstra / api.js
Created Jun 14, 2011
An example NodeJS / Mongoose / Express application based on their respective tutorials
View api.js
/* The API controller
Exports 3 methods:
* post - Creates a new thread
* list - Returns a list of threads
* show - Displays a thread and its posts
*/
var Thread = require('../models/thread.js');
var Post = require('../models/post.js');
@frostbytten
frostbytten / server.js
Created Jun 12, 2011
Connect-Auth Facebook Example
View server.js
// Example taken from https://github.com/ciaranj/connect-auth/issues/45
var fbId= "xxxxxxxxxxxxx";
var fbSecret= "xxxxxxxxxxxxxx";
var fbCallbackAddress= "http://localhost:3000/auth/facebook_callback"
var cookieSecret = "node"; // enter a random hash for security
var express= require('express');
var auth = require('connect-auth')
@chanon
chanon / gist:661597
Created Nov 3, 2010
Facebook iframe Canvas App Authentication in node.js
View gist:661597
var querystring = require("querystring");
var base64ToString = function(str) {
return (new Buffer(str || "", "base64")).toString("ascii");
};
var base64UrlToString = function(str) {
return base64ToString( base64UrlToBase64(str) );
};
You can’t perform that action at this time.