Use a custom server for Node.js - node.js

I recently made a amazing server in C#, and was curious if it was a good idea to use my custom C# server instead of making a server in Node.js. I prefer to use the C#, but I don't see the point if I can make one in node.js.
-Is it a good idea to use my server instead of making one in Node.Js?
-If I use Node.js, which module(s) should I use to set up sub-domains for my web application?

Related

Host for website that use node.js

I need a good web hosting where I can use node.js.
I have alot experience about cpanel and basic webhotel but I dont know how to use/install node.js.
I'm mainly using html, php, javascript and mysql but I have some features that need node.js.
Can you help me if you know good sites or you know how to use node.js in cpanel
Here is good post: http://codecondo.com/hosting-platforms-for-node-js/
These web sites have (pre)installed note.js, so no need aby installation.

Using ember.js with node.js + express.js

After years of PHP/MySQL development on the server-side, I'm trying to explore new technologies for building modern web applications.
I'm trying to make an order between all the JavaScript stuff and, if I have understood well, a valid solution can be node.js on the server-side, express.js to handle routing and, for example, ember.js and/or knockout.js to handle client-side with MVC/MVVM, binding, observers. Is it a valid architecture?
I built a pretty straightfoward website at the following github location
https://github.com/bwship/neptunejs
It uses node for the server side and ember for the clientside. It is also using Parse.com for it's data and api layer. But, the general idea should all be layed out for you there, including what I feel is a pretty solid folder and file structure.
Let me know if you have any questions. I came from an ASP.NET background, and have just completely fallen in love with client-side MVC.

SocketStream.js without client side how to?

I am interested in develop a rt module for my website with socketstream + node.js. I am only interested in do the server side in socketstream, not the client side. How can I access the socketstream from a normal php/html app, wich js i have to include ? I am mainly interested in rpc, pub/sub and authentication/session.
I would not recommend doing this, as it is unorthodox.
That said, I do recall that someone wanted to use an early version of SocketStream from within their application, which was built on the .net platform. It turned out that they got it to work by embedding the SocketStream app's web page inside of an iframe.
Check out to this framework:
http://www.socketstream.org/
Comes with a lot of examples and it's easy to use.

Google feed api in a nodejs application?

I have a php application that uses the google feed api to get the feeds I want and display them. I was wondering how can I call the google feed api from a nodejs application ?
Use node's http.request() (or the shortcut version http.get()) functionality; that's conceptually the same thing you must be currently doing in PHP.
You might find that installing and using Mikeal's request module would make things even simpler.

node.js - replace PHP, and asynchronously connect to it

Recently I started playing with node.js.
Since I'm developing a web app, I was interested in the benefits of google's javascript V8 engine, i started reading stuff about all this - and node.js.
An example of a webapp which uses node.js: http://bodesigns.com/simple-web-app-using-node-js/
As you can see, it uses node.js to connect to a mysql database. Some questions about this:
- First of all, is this safe? I mean: the username and password are stored in the file. I know, in PHP it is to, but a PHP-file is server-side. Node.js is server-side?
Second, with this (i'm also building a part of the web app with google maps stuff), i could replace the PHP-code I have now to collect some data from a mysql database? What are the (dis)advantages of replacing the PHP-code with node.js code?
Last: can I run a node.js server asynchronously? I mean: i have a HTML-page with a link (). When i click it, it must "run" the node.js-script, which collects data form the mysql-database. Like in the example. So when the page loads, only an empty map has to be visible. If you click something, markers have to show or hide. Is this possible?
My apologies for my bad English.
First of all, is this save?
node.js runs on the server, the code doesn't need to go to the client so it's safe.
What are the (dis)advantages of replacing the PHP-code with node.js code?
Do you need to rewrite code that already works? If your writing new code then PHP vs node.js is a completely different and application specific discussion. For generic applications they are both suitable
Is this possible?
Yes, however it's also possible with PHP.

Resources