Websocket server on a UWP app - javascript

I'm trying to implement a WebSocket server on my UWP app. Something similar to this plugin for Android and iOS, or Chrome socket server. I've looked into the Universal Windows Platform (UWP) app samples for WebSockets, but the way I understand it, it can be used as a Client side, while the Server is run separately using a PowerShell script.
My app is built with HTML and Javascript (AngularJS), compiled with Cordova framework and I wanted a WebSocket Server to run on it so that outside clients would be able to send commands to the app.
Is there any such way (or similar to it) to do this (to receive commands via TCP, etc)?

Related

ROSBridge connection with Android

I'm using webpack in nodejs to create a web server, and I'm using rosbridge to interface the web server with ROS.
Is there a way that I can connect the web client on an android tablet to rosbridge (I'm running the rosbridge node on the web server machine)?
I can see the UI on the client but I don't know how to interface it with ROS on Android.
Here is the js package that I'm using, and I'm using ROSLibJS

How to start big nodejs project virtual classroom?

Developers i'm a nodejs developer with a experience of 1.5 years working in the company my question is i'm doing a project which is called a virtual classroom like a webinar platform where chat support, drawing and etc functionalities are available, so from last 2 month had been done of working in project i had gone through the each component directory and file with it's documents also they have used of docker, redis, proxy server, nginx, session, mongodb these kind of services and it's working fine on server end side but can't able to stablish on my local machine and it's a linux based project where have numbers of powershell files with PM2 library to make it run... so i followed a docs with some code also i success to make the service on and registered a local domain also in hosts file or nginx custom configuration it is working fine... but when i hit my ulr on browser with the local domain it not going to any of the route....
Example - like if we make a node simple project with hello world and it will working on 4500 port so we write localhost:4500 and it will print our responce on browser
but if the run my project through a PM2 or a simple node app.js bcoz this app.js have connected with all nodes services and virtual classroom and you the linux platform we don't need to make serivice on it's by default in runing state monogoDB, redis, docker, nginx but the real question is while firing the command node app.js it shows some json and told port:2178 but when in hit this on browser localhost:2178 not responce to GET request why??? but there is route called localhost:2178/landing/session/v1/classid(which is encrypted code) this url not working what to do ??

How to i put Node.js on my hosting website

I'm a little confused on how node.js works on web hosting servers.
Now i understand how it works when i download node.js on my computer, i run files and stuff and the node.js files are on my computer.
What i dont understand is how i run node.js on my web hosting server.
If node.js is a downloadable file, how do i get it to run on my server...
Do i just find the file on my computer that says node.js(or whatever its called) and upload that to my server?
Any clarification on how to run node.js on my server will help.
Thanks!
A server is just another computer somewhere running OS like Linux, Windows and others but at large scale. Now Node.js is automatically configured if your web hosting server is a shared server or free plan server like Heroku, an awesome web hosting company with great hosting plan.
You only get to install Node.js on a web hosting server if its a dedicated server like an Ubuntu Machine on Amazon or Digital Ocean. I don't think you should bother yourself much. If you want to move your Node.js app from localhost to a web server I encourage you to read heroku documentation or this scotch.io link. It is extremely simple.

How to create a nodejs websocket client

I'm working on a project where I need to have multiple node clients connect to a node server via websockets. The clients will send files to the server and the server will immediately distribute that file to all connected clients.
The problem I'm running into is connecting as a client in node. The built in ws module seems to only support server use. I've also tried the npm websocket client which allows me to use node as a client but I seem to only be able to send binary data without any other information like the filename, etc. using the sendBytes method.
Thanks for any suggestions.
Checkout the delivery package of npm.
It provides bi-directional file tranfer for node.js over socket.io.
https://www.npmjs.com/package/delivery

Hosting HTML/CSS site on Visual Studio hosting service

I developed small Restful Web Service in VS2012 which should manipulate with database through entity framework.
Client side is HTML/CSS/JavaScript web site which shows data from database.
Is there any way to communicate by Ajax (to overcome cross domain issue) from my site to Restful Web Service without installing IIS, because I have really bad and slow computer and I need this only for quick test.
Can I host my web site somehow on service which Visual Studio uses to publish Services run by Visual Studio, or there is some other way how to test it quickly ?
If you're willing to use iisexpress Do this
Publish your website to any folder in your PC.
Then open a cmd window and run the following commands
cd "C:\Program Files\IIS Express"
on 64-bit OS,
cd "C:\Program Files (x86)\IIS Express"
Now the path would change to IIS Express>
Then run the following command
iisexpress /path:your\website\path\ /port:8030
This will start your website over the port 8030
IIS express will run as long as you don't close this cmd window. You can see iisexpress icon in the notification area also.
Easier way is to install IIS in your PC and host it with much better options.

Categories

Resources