[nodejs] Re: Video broadcasting with Node.js

2013-04-05 Thread Mikkel Wilson
You're in _slightly_ the wrong group. You can absolutely do this with node.js as the server component, but that's not required. The server is only required to pass some handshake info between peers and that could be implemented in PHP. What you're really looking for is WebRTC.

[nodejs] Re: Junkyard Jumbotron

2013-06-27 Thread Mikkel Wilson
Just a guess, but I'd say you forgot to run `npm install` to get the npm modules for this project. On Thursday, June 27, 2013 8:10:23 AM UTC-7, pat pagano wrote: Hello I am trying to build an MIT project, Junkyard Jumbotron but i am having difficulty with a few errors, can someone give me

[nodejs] Re: Java APi for Node.js

2013-07-25 Thread Mikkel Wilson
If you're not married to node.js specifically, http://vertx.io/ is a fast, asynchronous polyglot container that supports java and javascript running in the same context. It runs in the JVM and can actually be faster than node for some operations. -Mikkel On Thursday, July 12, 2012 11:28:16 PM

[nodejs] Re: cannot get node dns program to work externally

2017-08-10 Thread Mikkel Wilson
I haven't run this locally to test, but you appear to be binding only to the localhost address: https://github.com/tjfontaine/node-dns/blob/master/examples/forwarder.js#L10 This should exhibit the symptoms you mention and allow it to work on localhost and not on remote addresses. Change this

Re: [nodejs] Re: cannot get node dns program to work externally

2017-08-29 Thread Mikkel Wilson
ort 80 works > with localhost 127.0.0.1 though ? > > Aaron > > On 10 August 2017 at 19:37, Mikkel Wilson <code...@gmail.com > > wrote: > >> I haven't run this locally to test, but you appear to be binding only to >> the localhost address: >> https://github.com/

[nodejs] Re: How to exit from function which is called using wait.for.function()

2017-09-26 Thread Mikkel Wilson
Deepthi, You've declared the function 'a' don't appear to be executing it. To execute the function, it needs to be called. You can do this in many ways, but either adding parentheses at the end of the function declaration like this: var wait = require('wait-for-stuff'); function a(){

[nodejs] Re: [crypto] Chat with Diffie-Hellman and AES-256-CBC

2017-10-11 Thread Mikkel Wilson
Fernando, I have some experience with these protocols and tools and could help with an audit. I would suggest you also look at the fine work that's been done recently by the Keybase team in building their secure chat application: https://keybase.io/blog/keybase-chat. They're using symmetric

[nodejs] Re: Communicating with a C program without altering stdin/stdout/stderr

2017-12-19 Thread Mikkel Wilson
This would be a good case for using Native Addons for Node (nan). https://nodejs.org/api/n-api.html . You may be tempted to use the new C++ addons for node (https://nodejs.org/api/addons.html), but it's not API complete and spits annoying warnings (even with flags) so I'd suggest avoiding it.

[nodejs] Re: Building a network of sites (like Wordpress.com)?

2018-05-14 Thread Mikkel Wilson
Rob, Welcome to the world of software development. I don't believe your question is specific to Node.js, but could be implemented in many different languages/frameworks. There are already many platforms where users can create websites for different purposes. Wordpress.com is one example and is

[nodejs] Re: [node-soap] How do I get http status code in node-soap

2018-05-22 Thread Mikkel Wilson
> Since SOAP Client returns 401 as success This sounds extremely unusual. 401 is an HTTP code for a request that failed authentication. I suspect you don't have the right credentials or the library isn't sending them in the way the server expects. A 401 status code could include a body,

[nodejs] Re: I cannot export jQuery correctly; testing Node.js with mocha and chai

2018-04-30 Thread Mikkel Wilson
So, this is a server-side javascript environment. jQuery is more suited to a client-side environment (in a browser, not on a server). I think you're trying to use jQuery to make a request to a /metadata endpoint on a server to get some JSON. I'd suggest you use the 'request' package instead.

[nodejs] Re: Check if internet connection is working behind a proxy

2018-05-02 Thread Mikkel Wilson
allowed and > the other ones are blocked. But I'm not sure which ports are allowed. > > Martin > > > > Am Montag, 30. April 2018 21:42:46 UTC+2 schrieb Mikkel Wilson: >> >> This module is just doing a DNS query. >> https://github.com/ourcodeworld/internet-ava

[nodejs] Re: Check if internet connection is working behind a proxy

2018-04-30 Thread Mikkel Wilson
This module is just doing a DNS query. https://github.com/ourcodeworld/internet-available/blob/master/internet-available.js#L25 What is your proxy doing that is blocking port 53? Mikkel https://www.oblivious.io/ On Monday, April 30, 2018 at 8:43:10

[nodejs] Re: NodeJS and WSDL

2018-02-16 Thread Mikkel Wilson
Are you familiar with how to use NPM? There are already great libraries for making this work and, fortunately, it's pretty well documented. One option is strong-soap ( https://github.com/strongloop/strong-soap ), but you can search for others. $ npm install strong-soap --save // somefile.js

[nodejs] Re: Advice needed: Structuring SOAP Application with Disparate Parts

2018-08-30 Thread Mikkel Wilson
The structure of this program seems very strange to me and that may explain the performance issue you describe. You appear to be trying to write a java program in node.js and using java objects/primitives; effectively controlling a JVM through javascript. This is possible with something like

[nodejs] Re: UnhandledPromiseRejectionWarning: NoSuchElementError: no such element: Unable to locate element:

2018-09-04 Thread Mikkel Wilson
Siva, I'm not sure exactly what front-end testing framework you're using here, but there are two ways to handle the promise rejection you're seeing. First is to just wrap this whole block in a try/catch. try { driver.findElement(By.id('username')).sendKeys('xxx');

[nodejs] Re: UnhandledPromiseRejectionWarning: NoSuchElementError: no such element: Unable to locate element:

2018-09-05 Thread Mikkel Wilson
Siva, So, this is the part about asynchronous code that takes a moment to get your head around. findElement is returning a Promise, not the Element object as you would expect in Java. To get the result of the findElement function you need to wait until it's complete evaluating the function.

[nodejs] Re: UnhandledPromiseRejectionWarning: NoSuchElementError: no such element: Unable to locate element:

2018-09-06 Thread Mikkel Wilson
You're missing an important keyword, 'await'. I'll try to explain. var elem = await dvr.findElement(By.xpath("//tr[contains(.,'xxx')]")); This will let the findElement function finish executing and return the element object, then assign it to 'elem'. Without the 'await' keyword, 'elem' is a

[nodejs] Re: NPM warnings - how to rectify?

2018-02-28 Thread Mikkel Wilson
This must be quite an old piece of software you're using. You should remove the 'crypto' package from the dependencies in your package.json and remove your package-lock.json, then run `npm install`. The built-in crypto package should then load properly and the warning will go away.

[nodejs] Re: Backdoor

2018-03-12 Thread Mikkel Wilson
Can you post the script here and let someone do a code review? Alternatively, turn off your internet connection and run the script in a docker container. If it's trying to dial home, don't give it a network path or access to a filesystem you care about. Mikkel On Saturday, March 10, 2018 at

[nodejs] Re: Node Soap - null response

2018-04-13 Thread Mikkel Wilson
client.authenticate doesn't appear to be a method in this library. It may be making some kind of request that's populating lastRequest, but I think you need client.setSecurity(). See the docs here for an example: https://github.com/vpulim/node-soap#basicauthsecurity I'd also suggest skip the

[nodejs] Re: passenger nginx configuration

2018-04-17 Thread Mikkel Wilson
TL;DR - You probably don't need Nginx and you definitely don't need Passenger. Node is different from Ruby in that it doesn't really need an HTTP proxy to sit in front of it (LinkedIn famously removed their front-end proxies a few years ago). When you run peerjs, it's starting an http server

[nodejs] Re: Getting the port number from the service name

2018-03-28 Thread Mikkel Wilson
So, a 'service' is a logical human thing, not a fixed, networking thing. The items in /etc/services are just a handy 'commonly used' mapping, but aren't strictly or adhered to or used to configure the applications on your host. You can listen to HTTP on port 1337 just as well as you can on port

[nodejs] Re: Need help on Node modules

2018-03-28 Thread Mikkel Wilson
All the dependencies/modules for a node project are in the ./node_modules directory. If you copy this directory to a different project all the dependencies will stay in tact. However, be advised that the origin environment and destination environment must match quite closely. Changes to the

[nodejs] End-to-End Encryption for Node.js and S3

2018-04-03 Thread Mikkel Wilson
Hey Folks, I needed super secure cloud storage for another project I’m working on, but privacy is important and the core technology is wide applicable so I thought I’d offer it as a service. It works just like the regular S3 libraries for node.js but adds end-to-end encryption of all content

[nodejs] Re: Node.Js Hosting

2018-04-26 Thread Mikkel Wilson
This depends on your level of linux knowledge or system administration skills, but in the past I've used: OVH: https://www.ovh.com/world/ Which lets you choose a region to host your stuff. Helpful for latency and legal requirements around data capture. Linode: https://www.linode.com/ Also a

[nodejs] Re: NodeJS app installation test

2018-09-19 Thread Mikkel Wilson
You can use 'n' (`npm install -g n`) for node versions, but switching npm versions may be more difficult. If you're trying to run this as part of a CI/CD pipeline and you can run on a machine that supports Docker, you can use `docker run node:$VERSION` to select which version to use. The list

[nodejs] Re: Run Node.js on localhost.

2018-11-17 Thread Mikkel Wilson
Does this node application need other resources (redis, database, etc) to function? If not, you should be able to run it on your localhost exactly the same as you would on the server. If you're building a server in node and seeking a local development environment, I highly recommend you read

[nodejs] Re: Problems with my Native C++ Addon in Electron

2019-01-10 Thread Mikkel Wilson
I've had a similar problem with C++ addons. In one instance I had to change libraries ('iltorb' compression library) and in the other I had to use emscripten to transpile the C++ code into javascript so the V8 engine could use directly. It doesn't feel like a solution as much as a workaround,

[nodejs] Re: Node performance issues

2018-09-15 Thread Mikkel Wilson
Dom, You've mentioned the number of requests made from the frontend to the backend, but how many requests are you making from the backend express app to other microservices internally? You mention a 20-40ms latency which, I agree, seems abnormally high. If you're making 10 such sequential