This file contains 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
// ./app.js | |
// My GitHub API credentials are all hardcoded in a credentials.js file | |
var credentials = require('./credentials'); | |
var GITHUB_CLIENT_ID = credentials.github.id; | |
var GITHUB_CLIENT_SECRET = credentials.github.secret; | |
var CALLBACK_URL = credentials.github.callback; |
This file contains 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
var express = require('express') | |
, https = require('https') | |
, cookieParser = require('cookie-parser') | |
, cons = require('consolidate') | |
, bodyParser = require('body-parser') | |
, path = require('path') | |
, extend = require("extend") | |
, Cloudant = require('cloudant') | |
, session = require('express-session') | |
, url = require('url') |
This file contains 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
var request = require('supertest'); | |
var app = require('./app'); | |
function makeGetRequest(urlPath) { | |
return request(app).get(urlPath); | |
} | |
//--------------- HOME PAGE ---------------// | |
describe('Requests for Home page (index)', function() { | |
it('Returns a 200 status code', function(done) { |
This file contains 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
var express = require('express'); | |
var router = express.Router(); | |
// Import Twitter SDK Library | |
var Twitter = require('twitter'); | |
// Need to store these credentials in ENV variables | |
var credentials = require('../credentials.js'); | |
var client = new Twitter({ | |
consumer_key: credentials.twitter.consumerKey, |
This file contains 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
{ title: 'node', | |
version: 'v0.12.0', | |
moduleLoadList: | |
[ 'Binding contextify', | |
'Binding natives', | |
'NativeModule events', | |
'NativeModule util', | |
'NativeModule buffer', | |
'Binding buffer', | |
'Binding smalloc', |
This file contains 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
var gulp = require('gulp'); | |
var sass = require('gulp-sass'); | |
var scsslint = require('gulp-scss-lint'); | |
var size = require('gulp-size'); | |
var csso = require('gulp-csso'); | |
var autoprefixer = require('gulp-autoprefixer'); | |
var browserSync = require('browser-sync'); | |
var plumber = require('gulp-plumber'); | |
var reload = browserSync.reload; |
This file contains 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
var express = require('express'), | |
Pokemon = require('../models/pokemon.js'), | |
apiRouter = express.Router(); | |
apiRouter.use(function(req, res, next) { | |
// console.log('Somebody just came to our app!'); | |
// console.log('This is where we will authenticate users -- but later!'); | |
next(); | |
}); |
This file contains 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
var request = require('request'); | |
var fs = require('fs'); | |
var pokemonjson = require('./pokemon.json'); | |
var Pokemon = require('./app/models/pokemon.js'); | |
// db.pokemons.update({}, {$unset: {sprites: ""}}, {multi: true, safe: true}); | |
for (var i=600; i < 718; i++) { | |
var typesArray = []; | |
var spriteUrl = 'http://pokeapi.co/media/img/'+ pokemonjson[i].national_id +'.png'; |