Re: [nodejs] Re: How can i call a node.js method from PHP

2016-03-19 Thread 'Kevin "Ingwie Phoenix" Ingwersen' via nodejs
Or use hprose. An RPC protocol that can communicate between Node and PHP. I use it in my own project to forward unhandled HTTP traffic from node to PHP to run a traditional Laravel app. -- Job board: http://jobs.nodejs.org/ New group rules:

[nodejs] Node + Spawn a child process once and then provide stdin's and read stdout's from it

2016-03-19 Thread S.Sai Prashath
I'm spawning a child process using spawn-command npm package, i do this when the node server starts and then for every request i read the query value and hit the running child process with stdin. The stdout that comes out of the child process is an event stream and i add a listener to read

[nodejs] Is node-dbf a safe library to use to read from a .dbf file that is maybe being read from?

2016-03-19 Thread Andrew Leer
Is it safe to use node-dbf with node.js to read from a .dbf file when other are possibly writing to it? I don't understand the locking mechanisms of the dbf file based format considering it doesn't run on a server, and so I was just wondering if anyone knew about this. Thank you, Andrew

[nodejs] Re: How can i call a node.js method from PHP

2016-03-19 Thread Denard Springle
Lots of different ways... 1. expose an API using Node.js for your PHP web app to call (e.g. build a REST API around the GPS module) 2. if node and PHP are on the same physical server, and it is a low use (e.g. under 20 concurrent users) system, you could write a file in PHP and

[nodejs] Nodejs Addons. C++ to JS type conversion

2016-03-19 Thread HungryHippo
hi, i'm really struggling to work with Nan and conversions of C++ to V8 types. How would i convert this format ? std::vector data; info.GetReturnValue().Set(Nan::New(convertedData)); thanks for any help :-) -- Job board: http://jobs.nodejs.org/ New group rules:

Re: [nodejs] Re: I need a way to install npm packages offline

2016-03-19 Thread Ryan Graham
On Tue, 15 Mar 2016 at 08:33 Gilberto Valentin wrote: > ../node_modules/nan/nan.h:41:3: error: #error This version of node/NAN/v8 >>> requires a C++11 compiler >> >> In file included from >>>

Re: [nodejs] module export mySQL - ReferenceError: connection is not defined

2016-03-19 Thread Emanuele DelBono
connection is defined in main.js not in match.js Modules isolate the scope of the variables. Since match.js exports a function you can pass the connection to the function. On Sat, Mar 19, 2016 at 11:16 AM, jeg wrote: > Hi all, > > error message when match.js is called

[nodejs] module export mySQL - ReferenceError: connection is not defined

2016-03-19 Thread jeg
Hi all, error message when match.js is called with insert thanks Eric match.js:53 connection.query('insert into MYTABLE set ' + wREQUEST, function(err, res) { ^ ReferenceError: connection is not defined *** main.js var request = require('request'); var cheerio =

Re: [nodejs] Nodejs Addons. C++ to JS type conversion

2016-03-19 Thread HungryHippo
thanks Ben, I found setting up the addon quite straightforward but all the type conversions of the javascript inputs to c++ and c++ outputs to v8 was the tricky bit. On Saturday, March 19, 2016 at 6:35:17 AM UTC, Ben Noordhuis wrote: > > On Wed, Mar 16, 2016 at 9:59 PM, HungryHippo >

[nodejs] How can i call a node.js method from PHP

2016-03-19 Thread Amrit Kumar
I am working on a GPS tracking system and have used node js module available for gps tracking. i would like to understand how i can call method from my web interface developed in Php to the node.js server so that the node.js server can further send the command to the GPS device on tcp .

Re: [nodejs] Create config file on first use

2016-03-19 Thread Daniel Rinehart
A few comments: 1) Not sure what version of node you are using but fs.exists is deprecated with fs.stat being one of the recommended replacements. 2) Using either fs.exists or fs.stat both are asynchronous function so will not immediately execute the callback function which means the following

[nodejs] I want to share with you a tool aimed to help development

2016-03-19 Thread Victor Bjelkholm
Hey all! New to this mailing list, but couldn't see anything that forbid people from sharing what they built so here I am. I recently had the need to try out some different terminal "spinners" (loading icons) but I didn't want to add them to a non-existing project and tonic-dev was not very

[nodejs] Node Websockets

2016-03-19 Thread Ray
Is there a way to have an audio play over a websocket? As an example, I want to make the sound of a bell on one of the many websocket clients. Is there an easy way to do that? I dont want to have to install any file at the client site. Thanks, Ray -- Job board: http://jobs.nodejs.org/

Re: [nodejs] Nodejs Addons. C++ to JS type conversion

2016-03-19 Thread Ben Noordhuis
On Wed, Mar 16, 2016 at 9:59 PM, HungryHippo wrote: > hi, i'm really struggling to work with Nan and conversions of C++ to V8 > types. > > How would i convert this format ? std::vector data; > > > info.GetReturnValue().Set(Nan::New(convertedData)); > > > thanks for

[nodejs] Re: Node Websockets

2016-03-19 Thread J Decker
On Thursday, March 17, 2016 at 9:16:51 AM UTC-7, Ray wrote: > > > Is there a way to have an audio play over a websocket? > > As an example, I want to make the sound of a bell on one of the many > websocket clients. > > Is there an easy way to do that? I dont want to have to install any file >

[nodejs] Create config file on first use

2016-03-19 Thread Noel Hibbard
I am brand new to Node and so far things have gone smooth but I am trying to put some settings in a config.json and use require to load them. My problem is the first time the tool runs the file does not exist so I wrote some code to check to see if it exists and if not I create a default config