Skip to content

Instantly share code, notes, and snippets.

View abhitheawesomecoder's full-sized avatar

Abhishek Kumar abhitheawesomecoder

View GitHub Profile
const Constants = {
SECRET: 'iloveyou'
}
export default Constants
import express from 'express';
import { graphqlExpress, graphiqlExpress } from 'apollo-server-express';
import bodyParser from 'body-parser';
import schema from './data/schema';
import cors from 'cors';
import jwt from 'express-jwt';
import Constants from './constants';
import { User } from './data/connectors';
const GRAPHQL_PORT = 4000;
import {
makeExecutableSchema,
addMockFunctionsToSchema,
} from 'graphql-tools';
import resolvers from './resolvers';
const typeDefs = `
type User {
id: Int
import { User } from './connectors';
import bcrypt from 'bcrypt';
import jwt from 'jsonwebtoken';
import Constants from '../constants';
const resolvers = {
Query: {
user(_, args) {
return User.find({ where: args });
},
import Sequelize from 'sequelize';
import casual from 'casual';
import _ from 'lodash';
import bcrypt from 'bcrypt';
const password = "test123"
const db = new Sequelize('blog', null, null, {
dialect: 'sqlite',
storage: './blog.sqlite',
});
@abhitheawesomecoder
abhitheawesomecoder / gist:a1aaae61d3649c75105b140abb3d546e
Created July 8, 2017 06:57
How to add Animated Modal to your React Native App
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
TouchableOpacity,
Button
} from 'react-native';
import Modal from 'react-native-modal'