WindowsAzure/azure-sdk-for-node — Issue #15: simple program works locally but not work when deployed
Author: vasili-zolotov
Created: 2011-12-22 06:46:17+00:00
State: open

The following program doesn't work when deployed to staging or production. node.exe appears to crash due to unhandled exception leaving only this behind:

node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: getaddrinfo ENOENT
at errnoException (dns.js:31:11)
at Object.onanswer [as oncomplete] (dns.js:140:16)

```javascript
var http = require('http');
var port = process.env.port || 1337;

var KEY1 = "xxx";
var KEY2 = "zzz";

var util = require('util');
var azure = require('azure');
var tables = azure.createTableService(KEY1, KEY2);

http.createServer(function (req, res) {
tables.createTableIfNotExists("Filters", function (error) {
res.writeHead(200, { 'Content-Type': 'text/plain' });
if (error) {
res.end('ERROR: ' + util.inspect(error,true));
} else {
res.end('EXISTS!');
}
});
}).listen(port);
```

```xml

```