How to use the parse.Parse function in parse

To help you get started, we’ve selected a few parse examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github facebookarchive / CloudCodeWebhooks-Express / server.js View on Github external
// Parse Cloud Code Webhooks example for Express JS

// Require Node Modules
var https = require('https'),
    fs = require('fs'),
    express = require('express'),
    bodyParser = require('body-parser'),
    Parse = require('parse').Parse;

// Load SSL Certificate details, and the apps Webhook key
var privateKey = fs.readFileSync('private-key.pem'),
    certificate = fs.readFileSync('certificate.pem'),
    webhookKey = fs.readFileSync('webhook.key').toString().trim();

var serverOptions = {
  key: privateKey,
  cert: certificate
};

// Express middleware to enforce security using the Webhook Key
function validateWebhookRequest(req, res, next) {
  if (req.get('X-Parse-Webhook-Key') !== webhookKey) return errorResponse(res, 'Unauthorized Request.');
  next();
}
github Plateful / plateful-mobile / server / config / parse.js View on Github external
'use strict'

// var Parse = require('node-parse-api').Parse;
var Parse = require('parse').Parse;

var APP_ID = 'D0lspYUwswfHqznYEy8ndLvVMsciMd7o3KbyPoyJ';
var MASTER_KEY = 'bSqG0qGVrTD5T03G8KuaM6TbdJlBIK3nWVZMvoHi';
var JAVASCRIPT_KEY = 'iLYeezE6xpphWW3LjoHsXuv3ZOToXHQtvCJzMkRm';

Parse.initialize(APP_ID, JAVASCRIPT_KEY);

module.exports = Parse;
github paramaggarwal / stylebook / JS / CreateView.js View on Github external
var React = require('react-native');
var Parse = require('parse').Parse;
var ParseReact = require('parse-react');
var Icon = require('FAKIconImage');

var {
  AppRegistry,
  StyleSheet,
  Text,
  View,
  Image,
  TabBarIOS,
  NavigatorIOS,
  ListView,
  TouchableWithoutFeedback,
  TextInput,
  ScrollView
} = React;
github petehunt / react-touch / src / framework / FetchingMixin.js View on Github external
var Parse = require('parse').Parse;

var Fetching;

if (typeof Parse !== 'undefined') {
  Fetching = Parse;
} else if (typeof Backbone !== 'undefined') {
  Fetching = Backbone;
} else {
  throw new Error('Cannot require() FetchingMixin without Parse or Backbone global');
}

var FetchingMixin = {
  /**
   * Helper that's useful with Fetching.
   */
  stateSetter: function(key) {
github paramaggarwal / stylebook / JS / OutfitCard.js View on Github external
var React = require('react-native');
var Parse = require('parse').Parse;
var ParseReact = require('parse-react');
var Icon = require('FAKIconImage');

var {
  AppRegistry,
  StyleSheet,
  Text,
  View,
  Image,
  TabBarIOS,
  NavigatorIOS,
  ListView
} = React;

var OutfitCard = React.createClass({
  propTypes: {
github petehunt / react-touch / src / framework / ReactHack.js View on Github external
/** @jsx React.DOM */

var React = require('React');
var Parse = require('parse').Parse;

var container = document.getElementById('react-root');

function handleRouteChange(component) {
  var routeParams = Array.prototype.slice.call(arguments, 1);
  React.renderComponent(
    ,
    container
  );
}

var ReactHack = {
  router: null,

  start: function(routes, pushState) {
    if (ReactHack.router) {
github petehunt / react-touch / src / data / Content.js View on Github external
var Parse = require('parse').Parse;

var Content = Parse.Object.extend('Content', {}, {
  create: function(pageName) {
    var instance = new Content();
    instance.set('pageName', pageName);
    instance.set('content', 'No content... *yet*.');
    instance.save();
    return instance;
  },

  getByPageName: function(pageName, defaultContent, cb) {
    var collection = new Content.Collection();
    collection.query = new Parse.Query(Content);
    collection.query.equalTo('pageName', pageName);
    collection.fetch({
      success: function(obj) {
github parse-community / ParseReact / demos / AnyBudget / js / ExpenseCreator.react.js View on Github external
*  this software is subject to the Parse Terms of Service
 *  [https://www.parse.com/about/terms]. This copyright notice shall be
 *  included in all copies or substantial portions of the software.
 *
 *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 *  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 *  IN THE SOFTWARE.
 *
 */

var React = require('react');
var Parse = require('parse').Parse;
var ParseReact = require('parse-react');

var Categories = require('./Categories.js');

var ExpenseCreator = React.createClass({
  getInitialState: function() {
    return {
      fileData: ''
    };
  },

  render: function() {
    return (
      <div>
        </div>
github dziamid / parse-mock / src / parse-mock.js View on Github external
var _ = require('lodash'),
  sinon = require('sinon'),
  Parse = require('parse'),

  lastObjectId = 1,
  registeredStubs = [],

  stubMethods;

if (typeof Parse.Parse != 'undefined') {
  Parse = Parse.Parse;
}

stubMethods = {
  stubRequest: [Parse, '_request'],
  stubCollectionFetch: [Parse.Collection.prototype, 'fetch'],
  stubConfigGet: [Parse.Config, 'get'],
  stubQueryFind: [Parse.Query.prototype, 'find'],
  stubQueryFirst: [Parse.Query.prototype, 'first'],
  stubQueryGet: [Parse.Query.prototype, 'get'],
  stubQueryCount: [Parse.Query.prototype, 'count'],
  stubObjectSave: [Parse.Object.prototype, 'save'],
  stubObjectFetch: [Parse.Object.prototype, 'fetch'],
  stubObjectDestroy: [Parse.Object.prototype, 'destroy']
};
github paramaggarwal / stylebook / JS / FeaturedView.js View on Github external
var React = require('react-native');
var Parse = require('parse').Parse;
var ParseReact = require('parse-react');
var Icon = require('FAKIconImage');

var {
  AppRegistry,
  StyleSheet,
  Text,
  View,
  Image,
  TabBarIOS,
  NavigatorIOS,
  ListView,
  TouchableWithoutFeedback
} = React;

var OutfitCard = require('./OutfitCard');