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
| "use strict"; | |
| var Alexa = require("alexa-sdk"); | |
| var request = require("request"); | |
| var config = require("./config.js"); | |
| exports.handler = function(event, context, callback) { | |
| console.log("In handler"); |
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 { AppRegistry, Text } from 'react-native'; | |
| class HelloWorldApp extends Component { | |
| render() { | |
| return ( | |
| <View> | |
| <Text>Hello There!</Text> | |
| <Text>This is a very simple Native React component.</Text> | |
| </View> |
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
| var config = { | |
| expressPort: 3000, | |
| client: { | |
| mongodb: { | |
| defaultDatabase: "mongopop", | |
| defaultCollection: "simples", | |
| defaultUri: "mongodb://localhost:27017" | |
| }, | |
| mockarooUrl: "http://www.mockaroo.com/536ecbc0/download?count=1000&key=48da1ee0" | |
| }, |
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
| DB.prototype.mostRecentDocument = function(coll) { | |
| // Return a promise that either resolves with the most recent docucment | |
| // from the collection (based on a reverse sort on `_id` or is rejected with the error | |
| // received from the database. | |
| var _this=this; | |
| return new Promise(function (resolve, reject) { | |
| _this.db.collection(coll, {strict:false}, function(error, collection){ |
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
| router.post('/checkIn', function(req, res, next) { | |
| /* Request from client to add a sample of the documents from a collection; the request | |
| should be of the form: | |
| { | |
| venue, | |
| date, | |
| url, | |
| location |
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'; | |
| export class ServerDetails extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| this.state = {serverIP: ""}; | |
| this.componentDidMount = this.componentDidMount.bind(this); | |
| } |
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 './App.css'; | |
| export class ConnectionInfo extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| this.state = { | |
| MongoDBBaseURI: "", | |
| MongoDBDatabaseName: "", |
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 './App.css'; | |
| import { DataService } from './data.service'; | |
| import { ServerDetails } from './server.details.component'; | |
| import { ConnectionInfo } from './connection.info.component'; | |
| import { CollectionName } from './collection.name.component'; | |
| import { CountDocuments } from './count.component'; | |
| import { AddDocuments } from './add.component'; | |
| import { UpdateDocuments } from './update.component'; | |
| import { SampleDocuments } from './sample.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
| if (this.state.repeat) { | |
| this.timerID = setInterval( | |
| () => this.countOnce(), | |
| 5000 | |
| ); | |
| } |
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 './App.css'; | |
| export class UpdateDocuments extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| this.state = { | |
| matchPattern: '{"field-name": "value"}', | |
| changePattern: '{"$set":{"mongopopComment": "MongoPop has been here"}, "$inc":{"mongopopCounter": 1}}', |