This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Module dependencies. | |
*/ | |
var express = require('express') | |
, routes = require('./routes') | |
, http = require('http') | |
, path = require('path'); | |
var app = express(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var SerialPort = require('serialport').SerialPort; | |
var modbus = require('../lib'); | |
var serialPort = new SerialPort('COM8', { | |
baudRate: 9600 | |
}); | |
serialPort.write = function(data) | |
{ | |
console.log('TX:', data); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
// Verbose example of reading `8` discrete inputs starting from address `0x0000` | |
// from a MODBUS TCP/IP slave. | |
var net = require('net'); | |
var SerialConnection = require('../lib/connections/SerialConnection'); | |
var RtuTransport = require('../lib/transports/RtuTransport'); | |
var functions = require('../lib/functions'); | |
var Transaction = require('../lib/Transaction'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### serial rpc module #### | |
ss = require 'socketstream' | |
_ = require 'underscore' | |
dashboardController = ss.api.app.controllers.dashboard | |
Dashboard = ss.api.app.models.Dashboard | |
fetchUserFromSession = ss.api.fetchUserFromSession | |
exports.actions = (req, res, ss) -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TypeError: Cannot call method 'channel' of undefined | |
at Object.<anonymous> (/home/pi/node-playground/dashku/server/rpc/pub.js:3:16) | |
at Module._compile (module.js:449:26) | |
at Object.Module._extensions..js (module.js:467:10) | |
at Module.load (module.js:356:32) | |
at Function.Module._load (module.js:312:12) | |
at Module.require (module.js:362:17) | |
at Object.require [as loadItem] (module.js:378:17) | |
at Object.exports.createApiTree.createApiTree (/home/pi/node-playground/dashku/node_modules/apitree/lib/apitree.js:57:113) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/******************************************************************************/ | |
/* ____ _ _ _____ */ | |
/* | _ \ ___ | |__ ___ | |_ |___ / */ | |
/* | |_) / _ \| '_ \ / _ \| __| |_ \ */ | |
/* | _ < (_) | |_) | (_) | |_ ___) | */ | |
/* |_| \_\___/|_.__/ \___/ \__| |____/ */ | |
/* By Sam Walsh */ | |
/* */ | |
/******************************************************************************/ | |
/******************************************************************************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/******************************************************************************/ | |
/* ____ _ _ _____ */ | |
/* | _ \ ___ | |__ ___ | |_ |___ / */ | |
/* | |_) / _ \| '_ \ / _ \| __| |_ \ */ | |
/* | _ < (_) | |_) | (_) | |_ ___) | */ | |
/* |_| \_\___/|_.__/ \___/ \__| |____/ */ | |
/* By Sam Walsh */ | |
/* */ | |
/******************************************************************************/ | |
/******************************************************************************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sam@sam-laptop:~/ss-test$ ls | |
node_modules | |
sam@sam-laptop:~/ss-test$ cd node_modules/ | |
sam@sam-laptop:~/ss-test/node_modules$ ls | |
socketstream | |
sam@sam-laptop:~/ss-test/node_modules$ cd .. | |
sam@sam-laptop:~/ss-test$ node | |
> var ss = require("socketstream") | |
undefined | |
> ss. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C:\Users\Sam\derby\derby-auth\example>npm start | |
> derby-auth-example@0.0.0 start C:\Users\Sam\derby\derby-auth\example | |
> node server.js | |
=============================================================================== | |
======== | |
= Please ensure that you set the default write concern for the database by set | |
ing = | |
= one of the options |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pi@raspberrypi ~/foobar $ node app.js | |
module.js:340 | |
throw err; | |
^ | |
Error: Cannot find module '/home/pi/foobar/node_modules/sails/node_modules/rigging/node_mo dules/node-sass/precompiled/linux-arm/binding' | |
at Function.Module._resolveFilename (module.js:338:15) | |
at Function.Module._load (module.js:280:25) | |
at Module.require (module.js:362:17) |
NewerOlder