Skip to content

Instantly share code, notes, and snippets.

@krunalm
krunalm / courseData.js
Created February 21, 2017 14:15 — forked from coryhouse/courseData.js
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"
},
@krunalm
krunalm / courseApi.js
Created February 21, 2017 14:15 — forked from coryhouse/courseApi.js
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(' ', '-');
};