Skip to content

Instantly share code, notes, and snippets.

Created April 4, 2013 00:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/5306814 to your computer and use it in GitHub Desktop.
Save anonymous/5306814 to your computer and use it in GitHub Desktop.
Deployment error in code, used to say something like #Object not found now it just says
info: Creating snapshot 1.0.0-38
info Uploading: [=============================] 100%
info: Updating app chat_room
info: Activating snapshot 1.0.0-38 for chat_room
info: Starting app chat_room
error: Error running command deploy
error: Nodejitsu Error (500): Internal Server Error
error:
error: There was an error while attempting to start the app
error: Error spawning drone
error: Script prematurely exited
error:
error: This type of error is usually a user error.
error: Error output from app:
error:
error: info: socket.io started
error: /opt/haibu/apps/ayeayecapitan/chat_room/package/server.js:8
error: chatter.set_sockets(chat_room.sockets);
error: ^
help: For help with this error contact Nodejitsu Support:
help: webchat: <http://webchat.nodejitsu.com/>
help: irc: <irc://chat.freenode.net/#nodejitsu>
help: email: <support@nodejitsu.com>
help:
var all_sockets = null;
exports.set_sockets = function(sockets) {
all_sockets = sockets;
};
exports.connect_chatter = function (config) {
config.socket.emit('entrance', {message: 'Welcome to the chat room!'});
all_sockets.emit('entrance', {message: config.username + ' is online.'});
config.socket.on('disconnect', function () {
all_sockets.emit('exit', {message: config.username + ' has disconnected.'});
});
config.socket.on('chat', function (data) {
all_sockets.emit('chat', {message: config.username + ' says: ' + data.message});
});
};
exports.failure = function (socket) {
socket.emit('error', {message: 'Please log in to the chatroom.'});
};
var io = require('socket.io'),
connect = require('connect'),
chatter = require('chatter');
var app = connect().use(connect.static('public')).listen(8000);
var chat_room = io.listen(app);
chatter.set_sockets(chat_room.sockets);
chat_room.sockets.on('connection', function (socket) {
chatter.connect_chatter({
socket: socket,
username: socket.id
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment