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
| import Mongoose, { Schema } from 'mongoose'; | |
| import Random from 'random-js'; | |
| // Random Interface | |
| const r = new Random(Random.engines.mt19937().autoSeed()); | |
| // User Schema | |
| const UserSchema = new Schema({ | |
| id: { type: String, required: true, default: r.string(20) }, | |
| username: { type: String, required: true }, |
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
| const mapDispatchToProps = (dispatch) => { | |
| return { | |
| dispatch | |
| } | |
| } |
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
| const mapStateToProps = (state) => { | |
| return { | |
| drawerOpen: state.general.drawerOpen, | |
| }; | |
| }; | |
| // Unexpected block around arrow body, so I change to this: | |
| const mapStateToProps = (state) => { drawerOpen: state.general.drawerOpen }; |
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
| Resolver fired: | |
| { iss: 'Perseus', | |
| iat: 1462804776, | |
| exp: 1494340776, | |
| aud: '', | |
| sub: '', | |
| userid: '1', | |
| username: 'misutocoon', | |
| roles: [ 'user', 'admin' ] } |
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
| { | |
| "iss": "Perseus", | |
| "iat": 1462804585, | |
| "exp": 1494340584, | |
| "aud": "perseus.charlesbaker.net", | |
| "sub": "", | |
| "userid": "1", | |
| "username": "misutocoon", | |
| "roles": [ | |
| "user", |
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
| import path from 'path' | |
| import HtmlWebpackPlugin from 'html-webpack-plugin' | |
| import babel from 'babel-loader' | |
| import webpack from 'webpack' | |
| console.log("Loading development webpack configuration...") | |
| module.exports = { | |
| devtool: "sourcemap", |
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
| import React from 'react'; | |
| import { connect } from 'react-apollo' | |
| import store from './store.jsx' | |
| import AmazonForm from './amazon-form.jsx' | |
| import gql from 'apollo-client/npm/gql' | |
| const mapQueriesToProps = () => { | |
| return { | |
| bookData: { |
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
| import Amazon from 'amazon-product-api' | |
| import config from 'config' | |
| const AmazonClient = Amazon.createClient({ | |
| awsId: config.get('Amazon.AWS_ID'), | |
| awsSecret: config.get('Amazon.AWS_KEY'), | |
| awsTag: config.get('Amazon.AWS_TAG') | |
| }) | |
| export const schema = [` |
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
| import express from 'express'; | |
| import webpackDevMiddleware from 'webpack-dev-middleware' | |
| import webpackHotMiddleware from 'webpack-hot-middleware' | |
| import webpack from 'webpack' | |
| import webpackConfig from '../webpack.config' | |
| const devCompiler = webpack(webpackConfig) | |
| const app = express(); |
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
| import { Meteor } from 'meteor/meteor'; | |
| import { createContainer } from 'meteor/react-meteor-data'; | |
| import ConfigForm from './config-form.jsx'; | |
| import Config from '/collections/config'; | |
| export default createContainer(() => { | |
| const configHandle = Meteor.subscribe('getConfig'); | |
| const configLoading = !configHandle.ready(); // Not ready? | |
| const configEntry = Config.findOne({}); |