Skip to content

Instantly share code, notes, and snippets.

@basharh
basharh / index.js
Created September 13, 2017 18:06
API Server
import express from 'express';
const session = require('express-session')
import graphqlHTTP from 'express-graphql';
import jwt from 'express-jwt';
import config from 'config';
import cookieParser from 'cookie-parser';
import { schema, root } from './schema';
import upload from './middleware/upload';
import auth from './middleware/authentication';
@basharh
basharh / schema.js
Created September 13, 2017 18:05
API Schema
import {
GraphQLObjectType,
GraphQLString,
GraphQLFloat,
GraphQLList,
GraphQLSchema,
GraphQLInt,
buildSchema,
} from 'graphql';
import db from './models/db';
  • Dynamic Dispatch
  • Dynamic Method
  • Ghost Methods
  • Dynamic Proxies
  • Blank Slate
  • Kernel Method
  • Flattening the Scope (aka Nested Lexical Scopes)
  • Context Probe
  • Class Eval (not really a 'spell' more just a demonstration of its usage)
  • Class Macros
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
@basharh
basharh / index.html
Created September 16, 2015 23:01 — forked from anonymous/index.html
Training [add your bin description] // source http://jsbin.com/gidujetume
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="[add your bin description]">
<meta charset="utf-8">
<title>Training</title>
</head>
<body>
hello world!
@basharh
basharh / index.html
Last active September 16, 2015 23:00 — forked from anonymous/index.html
Training[add your bin description]// source http://jsbin.com/gidujetume
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="[add your bin description]">
<meta charset="utf-8">
<title>Training</title>
</head>
<body>
hello world, from bashar!