This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* /server/test/grant.client_credentials.js */ | |
'use strict'; | |
/* jshint camelcase: false */ | |
var chai = require('chai'); | |
chai.should(); | |
var loopback = require('loopback'); | |
var app = require('../server/server'); | |
var request = require('supertest')('https://localhost:3000'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
info: Welcome to Nodejitsu remotevision | |
info: jitsu v0.13.3, node v0.9.6 | |
info: It worked if it ends with Nodejitsu ok | |
warn: You are using unstable version of node.js. You may experience problems. | |
info: Executing command tokens create shared | |
info: Creating a token for remotevision | |
error: Error running command tokens create shared | |
error: Nodejitsu Error (401): Not Authorized | |
help: For help with this error contact Nodejitsu Support: | |
help: webchat: <http://webchat.nodejitsu.com/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "bandwango-node", | |
"version": "0.0.0", | |
"main": "./static/admin/index.html", | |
"ignore": [ | |
"**/.*", | |
"node_modules", | |
"./static/admin/components" | |
], | |
"devDependencies": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "bandwango", | |
"subdomain": "bandwango", | |
"scripts": { | |
"start": "bower install && grunt && node app.js", | |
"test": "mocha" | |
}, | |
"version": "0.0.1-20", | |
"engines": { | |
"node": "0.8.x" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
info: Creating snapshot 0.0.1-30 | |
info Uploading: [=============================] 100% | |
info: Updating app bandwango | |
info: Activating snapshot 0.0.1-30 for bandwango | |
info: Starting app bandwango | |
error: Error running command deploy | |
error: Errors occured while starting the application | |
error: Error starting application. This could be a user error. | |
error: info: Running start for app. | |
error: info: Cleaning /opt/run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "bandwango", | |
"subdomain": "bandwango", | |
"scripts": { | |
"start": "node app.js", | |
"test": "mocha" | |
}, | |
"version": "0.0.1-30", | |
"engines": { | |
"node": "0.8.x" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// images = [{ name: 'image name', data: [data or data url] }] | |
(function($) { | |
$.imageUrl = function(images, key) { | |
var imageObject = $.grep(images, function(e){ return e.name == key; }); | |
if(imageObject.length > 0) { | |
return imageObject[0].data; | |
} else { | |
return null; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports.storeImages = function(images, metadata, callback){ | |
try { | |
if(!images) callback([]); | |
if(images.length == 0) callback([]); | |
var schema = {owner: String}; | |
gridfstore.register('bandwango', schema); | |
var results = []; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//////////////////////////// | |
// Doesn't work in browser | |
// expecting image to be displayed (no html) | |
//////////////////////////// | |
// generic images route | |
server.get(version+'/images/:id', function(req, res) { | |
gridfstore.read( req.params.id, function(error,data) { | |
var img = new Buffer(data.buffer, 'base64'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[2013-02-19T01:24:32.855Z] TRACE: restify/86380 on ryan.local: running pre chain (req.remoteAddress=127.0.0.1, req.remotePort=54533) | |
OPTIONS /deliveryMethods/51204d5ceaf649f325000007 HTTP/1.1 | |
host: localhost:3000 | |
connection: keep-alive | |
access-control-request-method: PUT | |
origin: http://localhost:3001 | |
user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17 | |
access-control-request-headers: accept, origin, content-type | |
accept: */* | |
referer: http://localhost:3001/ |
NewerOlder