Cleaned up the copied project & got the Google authentication working. A lot of work still needs to be done to add content and allow only certain users access.
This commit is contained in:
@@ -1,12 +1,39 @@
|
||||
import '../imports/api/';
|
||||
import './google-oauth.js';
|
||||
|
||||
import url from 'url';
|
||||
//import './google-oauth.js';
|
||||
import connectRoute from 'connect-route';
|
||||
|
||||
// Got the below code from:
|
||||
// https://docs.meteor.com/packages/webapp.html
|
||||
WebApp.connectHandlers.use(connectRoute((router) => {
|
||||
router.get('/ping', (req, res, next) => {
|
||||
//TODO: Change ping / pong to something appropriate for a browser plugin reporting user/machine data and requesting updates.
|
||||
res.end("pong");
|
||||
});
|
||||
}));
|
||||
/* Did not work at all.. not sure why.
|
||||
let WebSocketServer = require("ws").Server;
|
||||
//var wss = new WebSocketServer({ port: env.PORT });
|
||||
let wss = new WebSocketServer({host: '192.168.3.101', port: 3001});
|
||||
|
||||
console.log("Starting WS");
|
||||
|
||||
wss.on("connection", function (ws) {
|
||||
console.log("WS Open");
|
||||
|
||||
ws.on("message", function(data) {
|
||||
console.log(data);
|
||||
ws.send("Pong");
|
||||
}).on("error", (err) => {
|
||||
console.log(err);
|
||||
})
|
||||
}).on('error', (err) => {
|
||||
console.error(err);
|
||||
});
|
||||
|
||||
// const net = require('net');
|
||||
//
|
||||
// const server = net.createServer((socket) => {
|
||||
// socket.on('data', (data) => {
|
||||
// console.log(data.toString());
|
||||
// socket.write("Pong");
|
||||
// });
|
||||
// }).on('error', (err) => {
|
||||
// console.error(err);
|
||||
// });
|
||||
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user