mirror of
https://github.com/s00500/nodeMessageBoard.git
synced 2024-12-18 12:30:48 +00:00
Updates - node v7 compatible now
This commit is contained in:
parent
33de2725f8
commit
d8be9e5ffc
@ -160,8 +160,9 @@ body {
|
|||||||
<div id="debugOut"> </div>
|
<div id="debugOut"> </div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="footer">
|
<!-- <div id="footer">
|
||||||
<h2>Send an SMS with a message to <span class="number" style="color:#3399ff;"></span></h2>
|
<h2>Send an SMS with a message to <span class="number" style="color:#3399ff;"></span></h2>
|
||||||
</div>
|
</div>
|
||||||
|
-->
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"emojize": "^0.2.0",
|
"emojize": "^0.2.0",
|
||||||
"lowdb": "^0.12.5",
|
"lowdb": "^0.12.5",
|
||||||
"serialport": "^2.0.6",
|
"serialport": "^4.0.5",
|
||||||
"socket.io": "^1.4.5"
|
"socket.io": "^1.4.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {},
|
"devDependencies": {},
|
||||||
|
@ -2,14 +2,12 @@ var fs = require('fs'),
|
|||||||
http = require('http'),
|
http = require('http'),
|
||||||
socketio = require('socket.io'),
|
socketio = require('socket.io'),
|
||||||
url = require("url"),
|
url = require("url"),
|
||||||
serialport = require("serialport");
|
SerialPort = require("serialport");
|
||||||
low = require('lowdb'),
|
low = require('lowdb'),
|
||||||
storage = require('lowdb/file-async'),
|
storage = require('lowdb/file-async'),
|
||||||
db = low('db.json', { storage });
|
db = low('db.json', { storage });
|
||||||
|
|
||||||
var convert = require('emojize').emojize;
|
var convert = require('emojize').emojize;
|
||||||
|
|
||||||
var SerialPort = serialport.SerialPort;
|
|
||||||
var config = low('config.json', { storage });
|
var config = low('config.json', { storage });
|
||||||
var socketServer;
|
var socketServer;
|
||||||
var port = config('mainConfig').chain().find({ param: 'port' }).value()['value'];
|
var port = config('mainConfig').chain().find({ param: 'port' }).value()['value'];
|
||||||
@ -126,7 +124,7 @@ function serialListener(debug)
|
|||||||
var receivedData = "";
|
var receivedData = "";
|
||||||
serialPort = new SerialPort(portName, {
|
serialPort = new SerialPort(portName, {
|
||||||
baudrate: 19200,
|
baudrate: 19200,
|
||||||
parser: serialport.parsers.readline("\n")
|
parser: SerialPort.parsers.readline("\n")
|
||||||
});
|
});
|
||||||
|
|
||||||
serialPort.on("open", function () {
|
serialPort.on("open", function () {
|
||||||
|
Loading…
Reference in New Issue
Block a user