How to use the parse.initialize 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 jaredpalmer / react-email-workflow / client / routes.js View on Github external
/* global Parse */
import React from 'react'
import { Router, Route, IndexRoute, browserHistory } from 'react-router'
import App from './containers/App'
import Editor from './containers/Editor'
import Login from './containers/Login'
import Logout from './containers/Logout'
import Parse from 'parse'

Parse.initialize('react-email')
Parse.serverURL = 'http://0.0.0.0:5000/parse'

function requireAuth(nextState, replace) {
  if (!Parse.User.current()) {
    replace({
      pathname: '/login',
      state: { nextPathname: nextState.location.pathname }
    })
  }
}


export default () => {
  return (
github parse-community / ParseReact / demos / todo / js / app.js View on Github external
*
 *  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');

// Insert your app's keys here:
Parse.initialize('APPLICATION_ID', 'JAVASCRIPT_KEY');

var TodoList = require('./TodoList.react.js');

React.render(
  ,
  document.getElementById('app')
);
github zendesk / linksf / js / app / admin.js View on Github external
$(function() {
  var Parse = require('parse');
  Parse.initialize("Z2l0Zn6NGrHCDoBPKUeD7Tf1fAUDaazQihQFqnL8", "kGPp7cydleuFbhKB4mrviTmbIjrbTjhxGP4dP7Ls");

  // provision the router instance
  var router = require('routers/admin_router').instance;

  // begin tracking hashChange
  require('backbone').history.start();
});
github zendesk / linksf / js / app / index.js View on Github external
$(function() {
  require('fastclick')(document.body);

  var Parse = require('parse');

  Parse.initialize("Z2l0Zn6NGrHCDoBPKUeD7Tf1fAUDaazQihQFqnL8", "kGPp7cydleuFbhKB4mrviTmbIjrbTjhxGP4dP7Ls");

  // provision the router instance
  var router = require('routers/router').instance;

  // begin tracking hashChange
  require('backbone').history.start();
});
github xugy0926 / community-react-app / js / token.js View on Github external
componentDidMount() {
    const query = this.props.location.search
    const arr = query.split('&')
    const session = arr[0].substr(3)
    Parse.initialize(parse.appId, parse.javascriptKey)
    Parse.serverURL = parse.serverURL
    Parse.User.become(session).then(() => {
      window.location.href = clientURL
    })
  }
  render() {
github almahdi / ra-data-parse / parseClient.js View on Github external
export default ({URL, APP_ID, JAVASCRIPT_KEY}) => {
    if(Parse.applicationId == null || Parse.javaScriptKey == null) {
        Parse.initialize(APP_ID, JAVASCRIPT_KEY);
        Parse.serverURL = URL;
    }
    return async (type, resource, params) => {
        const resourceObj = Parse.Object.extend(resource);
        const query = new Parse.Query(resourceObj);

        switch (type) {
            case GET_LIST: {
                const { page, perPage } = params.pagination;
                const { field, order } = params.sort;
                const { filter } = params;

                const count = await query.count();
                query.limit(perPage);
                query.skip((page - 1) * perPage);
github fkling / astexplorer / website / src / storage / parse / Parse.js View on Github external
import Parse from 'parse';
Parse.initialize(
  'PFIYect6yceEsU1m43fONUUKbJe89SRBZRuzJOGj',
  '0L4YKtVRqey2vRG0hjemm9TKb4edjNBSnZXC5Lni'
);
export default Parse;
github sphariab / Kerastase / app / components / ShareDiagnosis.js View on Github external
'use strict';

import Parse from 'parse';
Parse.initialize("KerastaseBO");
Parse.serverURL = 'http://kerastase-server.development-desk.fr/parse';
import React from 'react';
import { render } from 'react-dom';
import { Router, Route, Redirect, IndexRoute, browserHistory } from 'react-router';
import LinkedStateMixin from 'react-addons-linked-state-mixin';
import { Link } from 'react-router';
import { Modal } from 'react-bootstrap';
import Pagination from './Pagination';
import Footer from "./Footer";
import ActiveCounterRound from './ActiveCounterRound';
import CounterRound from './CounterRound';
import HorizontalLine from './HorizontalLine';
import Header from './Header';

require('../styles/Main.css');
require('../styles/Result.css');
github sphariab / Kerastase / app / components / InSalon.js View on Github external
'use strict';

import Parse from 'parse';
Parse.initialize("KerastaseBO");
Parse.serverURL = 'http://kerastase-server.development-desk.fr/parse';
import React from 'react';
import { render } from 'react-dom';
import { Router, Route, Redirect, IndexRoute, browserHistory } from 'react-router';
import LinkedStateMixin from 'react-addons-linked-state-mixin';
import { Link } from 'react-router';
import NewQuestion from './NewQuestion';
import Pagination from './Pagination';
import TitleComponent from './TitleComponent';
import ActiveCounterRound from './ActiveCounterRound';
import CounterRound from './CounterRound';
import HorizontalLine from './HorizontalLine';
import { Modal } from 'react-bootstrap';
import Header from './Header';
import Footer from "./Footer";
import Social from "./Social"
github sphariab / Kerastase / app / components / Profile.js View on Github external
'use strict';

import Parse from 'parse';
Parse.initialize("KerastaseBO");
Parse.serverURL = 'http://kerastase-server.development-desk.fr/parse';
import React from 'react';
import { render } from 'react-dom';
import { Router, Route, Redirect, IndexRoute, browserHistory } from 'react-router';
import LinkedStateMixin from 'react-addons-linked-state-mixin';
import Pagination from './Pagination';
import Header from './Header';
import Start from './Start';
import NewQuestion from './NewQuestion';
import TitleComponent from './TitleComponent';
import ActiveCounterRound from './ActiveCounterRound';
import CounterRound from './CounterRound';
import HorizontalLine from './HorizontalLine';
import SignUp from './SignUp';
import Footer from "./Footer"