CLI for parse-live-query-server (#2765)
* adds CLI for parse-live-query-server, adds ability to start parse-server with live-query server * Don't crash when the message is badly formatted
This commit is contained in:
15
src/cli/parse-live-query-server.js
Normal file
15
src/cli/parse-live-query-server.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import definitions from './definitions/parse-live-query-server';
|
||||
import runner from './utils/runner';
|
||||
import { ParseServer } from '../index';
|
||||
import express from 'express';
|
||||
|
||||
runner({
|
||||
definitions,
|
||||
start: function(program, options, logOptions) {
|
||||
logOptions();
|
||||
var app = express();
|
||||
var httpServer = require('http').createServer(app);
|
||||
httpServer.listen(options.port);
|
||||
ParseServer.createLiveQueryServer(httpServer, options);
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user