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 theme = { | |
typography: { | |
fontFamily: 'Raleway, Helvetica, sans-serif', | |
}, | |
colors: { | |
primaryColor: '#008000', | |
titleColor: 'white' | |
}, | |
secondaryColor: 'mediumseagreen', | |
}; |
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
// Future versions of Hyper may add additional config options, | |
// which will not automatically be merged into this file. | |
// See https://hyper.is#cfg for all currently supported options. | |
module.exports = { | |
config: { | |
// Choose either "stable" for receiving highly polished, | |
// or "canary" for less polished but more frequent updates | |
updateChannel: 'stable', |
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 express = require('express'); | |
const cors = require('cors'); | |
const bodyParser = require('body-parser'); | |
const morgan = require('morgan'); | |
const jwt = require('express-jwt'); | |
const jwksRsa = require('jwks-rsa'); | |
const jwtAuthz = require('express-jwt-authz'); | |
const Appbase = require('appbase-js'); | |
const fetch = require('node-fetch'); |
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, { Component } from 'react'; | |
import TodoItem from "./todoItem"; | |
import TodoFooter from "./todoFooter"; | |
const ALL_TODOS = "all"; | |
const ACTIVE_TODOS = "active"; | |
const COMPLETED_TODOS = "completed"; | |
class TodoList extends Component { |
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, { Component } from "react"; | |
import { | |
ReactiveBase, | |
ReactiveList, | |
TextField, | |
DataController | |
} from "@appbaseio/reactivesearch"; | |
import Utils from "./utils"; | |
import TodoList from "./todoList"; |
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 Appbase from "appbase-js"; | |
import Utils from "./utils"; | |
import Auth from './auth'; | |
const ES_TYPE = "todo_reactjs"; | |
const auth = new Auth(); | |
const headers = () => ({ | |
'Content-Type': 'application/json', |
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 auth0 from 'auth0-js'; | |
import history from './history'; | |
export default class Auth { | |
requestedScopes = 'openid profile email read:todos write:todos'; | |
// Please use your own credentials here | |
auth0 = new auth0.WebAuth({ | |
domain: 'divyanshu.auth0.com', | |
clientID: 'IcVGTI2AUvc49lnE0ltVemretrsI3y3P', |
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 createHistory from 'history/createBrowserHistory'; | |
export default createHistory({ | |
basename: process.env.NODE_ENV === 'development' ? '/' : '/todomvc-authorization-client' | |
}); |
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 Appbase from "appbase-js"; | |
import Utils from "./utils"; | |
import Auth from './auth'; | |
const ES_TYPE = "todo_reactjs"; | |
const auth = new Auth(); | |
const headers = () => ({ | |
'Content-Type': 'application/json', |
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 ReactDOM from 'react-dom'; | |
import { Route, Router } from 'react-router-dom'; | |
import TodoModel from './todoModel'; | |
import TodoApp from './todoApp'; | |
import Callback from './Callback'; | |
import Auth from './auth'; | |
import history from './history'; |