Node.js cloud hosts with Windows support - javascript

I've researched many node.js cloud hosts, yet I'm having trouble finding one that suits my needs. The host needs to have free service for as long as an application is in development (sandbox mode). It also needs to have a Windows client, and ease of use is a huge plus. If possible, I'd like the host to be out of beta.
Can anyone recommend a simple node.js host that meets my needs?

Have you checked out Azure hosting?
The host needs to have free service for as long as an application is in development (sandbox mode)
They're currently offering a 90-day free trial and they've spent some real effort making Node.js work with their platform.
It also needs to have a Windows client, and ease of use is a huge plus.
They have a socket.io example and an example of using their free Windows-based dev tools to get up and running.
If possible, I'd like the host to be out of beta.
Node.JS has yet to hit version 1.0. At some level the whole tool chain is beta. However, Windows Azure is paid for and supported. They have people actively working on both Node.JS and some drivers (such as SQL Server support). To me, that's as "non-beta" as you'll get right now.

Related

Cordova web server with configurable responses

Is there any way to set up a local web server in a Cordova application such that I can control the responses via Javascript? I'm currently developing a custom plugin that communicates with a remote system via HTTP. I'd like to be able to run integration tests on this that are written in the Javascript code of a Cordova application, so I can easily test them in all supported platforms (Android, iOS, and ideally in the browser too... although the latter seems a little unlikely to be possible), but this means I need to be able to set up mock API responses from javascript code ... which will require the presence of a mock server that the plugin can communicate with.
I'm familiar with this plugin, but it can only respond using files in the local system -- I want to be able to generate responses and capture sent POST data in a Javascript callback. Is there any existing way of doing this?
Having searched extensively, I came to the conclusion that no such plugin exists.
I have therefore started an implementation of such a plugin myself: the initial version is now available on NPM and GitHub, with a sample project available in the github repository.
Android support is currently functioning, and I intended to start on iOS support in the next few days.
(Updated to add: unfortunately the project I was working on was cancelled, so have not had time supported by my employer to finish the iOS version, and as I don't have a mac personally so can't work on this on my own time, this seems unlikely to happen in the near future, but if anyone else needs it, it should be relatively simple to add the iOS version)

Making a node.js application a PEER with WebRTC

So, I have a web app that generates large buffers of color information that I want to send to a node application running on another machine in my local network. Web Sockets doesn't seem to be fast enough for me. I was looking to use UDP and it seems WebRTC is the only way to do that from a browser. The caveat, it seems, is WebRTC is only PEER to PEER (browser to browser). I figured, I could use node webkit to emulate being my other "PEER". In my node app I could handle the "signaling" and have it set itself up in a RTCPeerConnection to my web app. Therefore, I could send my data from my web app to my node app (local network). For some context, I have one computer running native software to drive a light fixture and I want to use a web app to control the lights.
To boil the question down, how can I make a RTCPeerConnection from a browser to a node webkit app?
Any help would greatly appreciated.
Thank you!
-Jake
Node-RTCPeerConnection is an attempt (current WIP) to create a spec compliant implementation of RTCPeerConnection for Node.js entirely in JavaScript with no native C or C++ code. This enables browser-peers to speak to non-browser (Node.js) peers.
But you can not use it for production yet.
Then we also have wrtc (node-webrtc) that provides a native module for NodeJS that supports a subset of standards-compliant WebRTC features. Specifically, the PeerConnection and DataChannel APIs.
Too many people are having problems with wrtc. Since it has to download lots of source and build it only to find out that it fails after a long while on certain platforms. Unfortunately it doesn't come with any prebuilt packages described in this issue
You can use either the google implementation of webrtc or a more recent implementation (by Ericsson) called openWebrtc. The developers of openWebRTC are very proud of running their implementation on various pieces of hardware like raspberry pi and iOS devices.
The one that worked best for me was electron-webrtc (which in turn uses electron-prebuilt) for better compatibility. It creates a hidden Electron process (which is based on Chromium, so WebRTC support is great!) and communicates with that process to enable WebRTC in Node.js. This adds a lot of overhead.
It is intended for use with RTCDataChannels, so the MediaStream API is not supported.
Other resources:
https://github.com/webrtcftw/goals/issues/1
Update 2019
Currently, the best and easiest way to solve this problem is to use webrtc module. Check samples for inspiration. This module does what you were looking for, implemented with N-API and using Canvas module to compose new video from the client stream. Hopefully this will help those who face this problem in the future.

Protecting Apps with Apache Cordova MS VS Extension on App Stores

Just have a question about apps that are uploaded on the Windows Store, Andriod Store, and Apple Store. I have never built an App before for any of the three stores, but the Multi Hybrid Extension for Visual Studio seems to be a great start to cover all three Platforms.
How do I protect my code for apps that are uploaded to the three stores? The core development for the Apache Cordova extension is done in HTML5 and Javascript. On a regular HTML / Javascript website, the end user can simply right click and View Source of the page and see all the code I've written.
My question is, how is this protected for apps that are uploaded to the app store? Will someone be able to reverse engineer my application and get the code and simply re-sell it?
Thank you all for your time
You want to, develop once, deploy many. Then, you’ll want to use HTML5 to do it.
You can use Apache Cordova directly, but you’ll want to use a service like Telerik AppBuilder, Adobe Phonegap or Intel XDK.
Regarding your question, your best bet is to use a good JavaScript source code obfuscation service to protect your sources before publishing. There is no such thing as a 100% full proof solution when it comes to JavaScript obfuscation, but professional tools such as JScrambler can take you a long way. At least JScrambler I know that it supports Mobile and HTML5, which is good because they make sure the resulting code is compliant.
There are other tools, even free ones. But be careful though, there are tons of other tools that do obfuscation, encoding/packing or minfication that seem to provide protection, but are reversed in a few minutes. So, unless you really know how to tell the difference, I recommend that you rely on a professional service.

HTML5 desktop frameworks (relaxed) browser security

I have a question regarding the (relaxed) browser security of app.js as i have read somewhere in documentation (i tried searching for it but could not find it). I do see that there is an option that can be set here:
https://github.com/appjs/appjs/blob/master/docs/index.md
I have started building a desktop application using adobe AIR using Starling and Feathers UI because the service i am building the app for (Pinboard) does not have CORS enabled and will not do so in the future (see this google group chat about it). However, i would like to start with (node-webkit / App.js / similar HTML5 desktop framework) as well, just to see how that goes (and also i believe that building good transitional interfaces is a lot easier and faster in HTML5 nowadays).
My generalized question is: will app.js and other HTML5 desktop application frameworks allow me to circumvent CORS requirements? I am trying to find more concrete information about the browser security settings but i can not find it. Any pointer to such information (of different desktop application frameworks) will be greatly appreciated!
Michael
On the "server" side of your app, you are running Node.js, which does not enforce any CORS restrictions. That's a browser thing, Node.js is just a JavaScript runtime.
On the client side of your app though, you might suffer from CORS, that depends on the runtime/framework and I couldn't find anything about App.js either. But you could simply proxy requests to Pinboard through the server side, which would work around all CORS issues. There are a quite a few proxy servers for Node.js that could be used for this purpose, like node-http-proxy.

Use node.js as a WebRTC peer?

What modules are in existence to use node.js as a peer in WebRTC? I'd like to use WebRTC in a more client/server fashion than P2P for its apparent ability to send packets unreliably. (AKA, I don't want the huge delay TCP makes by guaranteeing packet arrival with data in order)
If I have to use a stripped-down browser page as a server, that would perhaps work... however, it would really be sub-optimal. Node.js would make things much smoother, and probably more reliable too.
Thanks!
Have a look at the Erizo component of Licode (WebRTC MCU). It has a stream controller and webrtc controller written in c++ with a js interface. It might help you getting a idea or two.
There is now a Node implementation of WebRTC, with the exception of MediaStreams.
https://github.com/js-platform/node-webrtc
There is a c++ interface for WebRTC. WebRTC is based on the libjingle project but uses the JSEP (Javascript Session Establishment Protocol) instead of XMPP for sending STUN/TURN information for NAT tunneling. The two projects were in the process of being merged when I looked at this a while back so compiling/linking it was a PITA. This may have been improved last year.
The goal would be to expose the native API for WebRTC as a node module with the node addon api and package it as an npm module that works like the in-browser API. The cross-browser polyfill will show you how it should look.
There's a lot of cool stuff you could do with this (call recording, SIP connectors, .torrent extensions to the browser, etc.) I really encourage you to try this!
The most relevant package i've found was http://js-platform.github.io/node-webrtc/ i managed to build it and play with it a little bit... The developer is very helpful, i think it's your best bet right now
The solution is to use libjingle or licode/erizo. Both of them require compilation but erizo provides a NodeJS interface. Libjingle was created by Google.
Unfortunately, you have to compile each library and there are no binary packages for Debian, Ubuntu or other platforms.
Take a look at PeerJS: Simple peer-to-peer with WebRTC.
You need PeerJS-server for signaling.
The guide: http://peerjs.com/
I used Node js with socket io and have success with it
There are many tutorials online

Categories

Resources