Ajax和Node.js

Is possible to send ajax request from apache server (e.g : http://localhost/myscript) to node js without any problems ??

I try that and it's work perfectly but it's not working in mozilla only IE.

my ajax :

$.ajax({
url : "http://localhost:3000/test_ajax",
type: "GET",
success : function(data){
    alert(data);
}
});

my nodejs server :

var express = require("express");

var app = express.createServer();

app.get('/test_ajax', function(req, res){
res.send('Hello World');
});

app.listen(3000);

is possible to use this in my projects without problemes?

It's not possible to using normal XHR (aka Ajax) in that case. See: Can I use XMLHttpRequest on a different port from a script file loaded from that port?

You'll have to either use JSONP (which allows cross-domain data retrieval)

$.ajax({…, dataType: 'jsonp'});

See: http://api.jquery.com/jQuery.ajax/

Other to set up a proxy on your main domain to do the conversion between the two ports. They are some projects doing that already: