How to use the parse-server.ParseServer.createLiveQueryServer function in parse-server

To help you get started, we’ve selected a few parse-server 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 TGIO / ParseLiveQuery / Server / server.js View on Github external
"serverURL": "http://192.168.0.31:1337/parse",
            "appId": "myAppId",
            "masterKey": "myMasterKey",
            "appName": "MyApp",
            "clientKey": "2ead5328dda34e688816040a0e78948a"
        }
    ]
});

// Serve the Parse API on the /parse URL prefix
app.use('/parse', api);
app.use('/dashboard', dashboard);

var httpServer = require('http').createServer(app);
httpServer.listen(4040);
var parseLiveQueryServer = ParseServer.createLiveQueryServer(httpServer);

app.listen(1337, function() {
    console.log('parse-server-example running on port 1337.');
});
github PiratesOnlineRewritten / Pirates-Online-Rewritten / parse / index.js View on Github external
app.use(mountPath, api);
console.log('Starting api at prefix:' + mountPath);

// Server the Parse Dashboard on the /admin URL prefix
mountPath = process.env.DASHBOARD_MOUNT || '/admin';
app.use(mountPath, dashboard);
console.log('Starting dashboard at prefix:' + mountPath);

var port = process.env.PORT || 1337;
var httpServer = require('http').createServer(app);
httpServer.listen(port, function() {
    console.log('parse server running on port ' + port + '.');
});

// This will enable the Live Query real-time server
ParseServer.createLiveQueryServer(httpServer);
github TechnionYP5777 / SmartCity-ParkingManagement / parse-server-example / index.js View on Github external
});

// There will be a test page available on the /test path of your server url
// Remove this before launching your app
app.get('/test', function(req, res) {
  res.sendFile(path.join(__dirname, '/public/test.html'));
});

var port = process.env.PORT || 1337;
var httpServer = require('http').createServer(app);
httpServer.listen(port, function() {
    console.log('parse-server-example running on port ' + port + '.');
});

// This will enable the Live Query real-time server
ParseServer.createLiveQueryServer(httpServer);
github gimdongwoo / NIPA-Titanium-BoilerPlate-BaaS / parse-server / index.js View on Github external
// Remove this before launching your app
app.get('/test', function(req, res) {
  res.sendFile(path.join(__dirname, '/public/test.html'));
});

// make the Parse Dashboard available at /dashboard
app.use('/dashboard', dashboard);

var port = process.env.PORT || 1337;
var httpServer = require('http').createServer(app);
httpServer.listen(port, function() {
    console.log('parse-server-example running on port ' + port + '.');
});

// This will enable the Live Query real-time server
ParseServer.createLiveQueryServer(httpServer);
github yongjhih / docker-parse-server / index.js View on Github external
app.use(mountPath, api);

// Parse Server plays nicely with the rest of your web routes
app.get('/', function(req, res) {
    res.status(200).send('I dream of being a web site.');
});



if(liveQuery) {
  console.log("Starting live query server");
  var httpServer = require('http').createServer(app);
  httpServer.listen(port);
  console.log('plac');
  var parseLiveQueryServer = ParseServer.createLiveQueryServer(httpServer);
} else {
  app.listen(port, function() {
    console.log('docker-parse-server running on ' + serverURL + ' (:' + port + mountPath + ')');
  });
}

// GraphQL
var isSupportGraphQL = process.env.GRAPHQL_SUPPORT;
var schemaURL = process.env.GRAPHQL_SCHEMA || './cloud/graphql/schema.js';

console.log('isSupportGraphQL :', isSupportGraphQL);
console.log('schemaURL :', schemaURL);

if(isSupportGraphQL){
    console.log('Starting GraphQL...');
github xugy0926 / community-react-app / server / app.js View on Github external
app.set('view engine', 'html')
app.engine('html', ejsMate)
app.locals._layoutFile = 'layout.html'
app.locals.config = config

app.use(cors())
app.use(bodyParser.json())
app.use(github.auth)
app.get('/github/auth', github.authenticate)
app.get('/github/callback', github.authenticate, github.callback)

app.use(config.get('mountPath'), api)
app.use(config.get('dashboardPath'), dashboard)

httpServer.listen(config.get('port'))
ParseServer.createLiveQueryServer(httpServer)

start(app)