Skip to content

Instantly share code, notes, and snippets.

@coryhouse
coryhouse / courseApi.js
Created August 6, 2015 20:50
Mock CourseAPI for "Building Applications with React and Flux" on Pluralsight
"use strict";
//This file is mocking a web API by hitting hard coded data.
var courses = require('./courseData').courses;
var _ = require('lodash');
//This would be performed on the server in a real app. Just stubbing in.
var _generateId = function(course) {
return course.title.replace(' ', '-');
};
@coryhouse
coryhouse / courseData.js
Created August 6, 2015 20:53
Course data for "Building Applications with React and Flux" on Pluralsight
module.exports = {
courses: [
{
id: "clean-code",
title: "Clean Code: Writing Code for Humans",
watchHref: "http://www.pluralsight.com/courses/writing-clean-code-humans",
author: {
id: "cory-house",
name: "Cory House"
},