My app.js has the following contents:
var express = require('express')
, http = require('http')
, path = require('path')
, redis = require('redis')
, client = redis.createClient();
var app = express();
app.configure(function(){
app.set('port', process.env.PORT || 3000);
app.set('views', __dirname + '/views');
app.set('view engine', 'jade');
app.use(express.favicon());
app.use(express.logger('dev'));
app.use(express.bodyParser());
app.use(express.methodOverride());
app.use(express.cookieParser('your secret here'));
app.use(express.session());
app.use(app.router);
app.use(require('stylus').middleware(__dirname + '/public'));
app.use(express.static(path.join(__dirname, 'public')));
});
app.configure('development', function(){
app.use(express.errorHandler());
});
require('./routes')(app);
client.on("connect", function () {
console.log("Client on connect");
});
http.createServer(app).listen(app.get('port'), function(){
console.log("Express server listening on port " + app.get('port'));
});
All I'm attempting is to use the node_redis library to connect with a Redis instance. Both Node.js, and Redis are installed locally. One thing I'd like to point out is that I created, and attempting to run this project with Jetbrains' Webstorm (since I would like an IDE that provides me with some debugging). The string 'Client on connect' is logged to the console, but my app pretty much crashes every single time with 'Process finished with exit code 139'. I tried running the app via the command line, and the app doesn't crash. The worst part is that there is no stack trace of any sort when the app fails to run in Webstorm. Does anyone have any clue on what the issue is or where I could find more information that is logged regarding this error code?
Also, just so that we're on the same page: My Redis server is up and running, and receiving a constant stream of data from another custom webapp. I was able to fire up redis-cli, and verify that Redis actually contains any data.