Skip to content

Instantly share code, notes, and snippets.

@smooJitter
smooJitter / demo-2.js
Created January 21, 2018 17:09 — forked from MicroBenz/demo-2.js
Recompose
import React from 'react';
import { conenct } from 'react-redux';
import { compose } from 'recompose';
const enhance = compose(
connect(
state => ({
campers: state.campers.lists
})
)
@smooJitter
smooJitter / guru-express-meteor-binding.js
Created July 11, 2017 08:17
This binds the specified paths to the Express server running Guru + GuruiQL
/*
* Application Server
*/
import express from 'express';
import { WebApp } from 'meteor/webapp';
import main from './main';
export default async function server () {
try {
@smooJitter
smooJitter / guru-ide-withMeteorToken.js
Created July 11, 2017 08:08
This should make it possible to forward meteor.user account profile to the guru graphql ide
/*
* GraphQL rourte
*/
'use strict';
import { graphqlExpress } from 'graphql-server-express';
import { makeExecutableSchema } from 'graphql-tools';
import { parse } from 'graphql';
import { schema, resolvers } from '../modules/ide/index-ide';
@smooJitter
smooJitter / guru-meteor-route.js
Created July 11, 2017 08:03
A proposal to add meteor user to the guru context object. This is based on the apollo-meteor-integration
/*
* GraphQL rourte
*/
'use strict';
import { Meteor } from 'meteor/meteor';
import { WebApp } from 'meteor/webapp';
import { Accounts } from 'meteor/accounts-base';
import { check } from 'meteor/check';
@smooJitter
smooJitter / repository.js
Created January 3, 2017 20:58 — forked from SerhiiKozachenko/repository.js
Mongoose odm and repository pattern.
var mongoose = require('mongoose');
var repository = function (modelName) {
var self = this;
self.Model = require('../models/' + modelName);
self.FindById = function (id, cb) {
self.FindOne({