Skip to content

Instantly share code, notes, and snippets.

View ohmtrivedi's full-sized avatar

Ohm Trivedi ohmtrivedi

View GitHub Profile
@ohmtrivedi
ohmtrivedi / api.js
Created October 16, 2018 21:04
Using Seneca with Connect and HTTP-Server
/* Author: Ohm Trivedi */
/*API Plugin */
const util = require('util');
module.exports = function api(options) {
let seneca = this;
seneca.add('role:api,path:msOne', function (msg, respond) {
// console.log(msg);
@ohmtrivedi
ohmtrivedi / api.js
Last active October 15, 2018 23:56
SenecaJS Client Request Timeout Error
module.exports = function api(options) {
let seneca = this;
seneca.add('role:api,path:msOne', function (msg, respond) {
// console.log(msg);
let { operation } = msg.args.params;
let { target } = msg.args.query;
// let operation = msg.args.body.operation;
// let target = msg.args.body.remote_ip;
if (operation == 'fpOS') {