This file contains 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, { Component } from 'react'; | |
import { | |
AppRegistry, | |
StyleSheet, | |
Text, | |
View, | |
TouchableOpacity, | |
Button | |
} from 'react-native'; | |
import Modal from 'react-native-modal' |
This file contains 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 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', | |
}); |
This file contains 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 { 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 }); | |
}, |
This file contains 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 { | |
makeExecutableSchema, | |
addMockFunctionsToSchema, | |
} from 'graphql-tools'; | |
import resolvers from './resolvers'; | |
const typeDefs = ` | |
type User { | |
id: Int |
This file contains 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 { 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; |
This file contains 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 Constants = { | |
SECRET: 'iloveyou' | |
} | |
export default Constants |
This file contains 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 { AsyncStorage } from 'react-native'; | |
import { ApolloProvider, createNetworkInterface, ApolloClient } from 'react-apollo' | |
import Mainuser from './components/mainuser' | |
import Login from './components/Login' | |
import Register from './components/Register' | |
const networkInterface = createNetworkInterface({ uri: 'http://192.168.1.3:4000/graphql' | |
}) |
This file contains 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, { Component } from 'react'; | |
import { StyleSheet, Text, View, Button, DatePickerAndroid, TimePickerAndroid, Picker, AppRegistry, TouchableOpacity } from 'react-native'; | |
//import AvailableDates from '../Calendar/Calendar'; | |
//import { Calendar, CalendarList } from 'react-native-calendars'; | |
let arrBooked = [] | |
const availableHours = { | |
"timeSlots": { | |
"slot1": "2:00pm to 2:30pm", |
This file contains 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 { View, Text } from 'react-native'; | |
export default class HomeScreen extends React.Component { | |
render() { | |
return ( | |
<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}> | |
<Text>Home Screen</Text> | |
</View> | |
); |
OlderNewer