Version 3, 29 June 2007
Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
Version 3, 29 June 2007
Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
// set-up a connection between the client and the server | |
var socket = io.connect(); | |
// let's assume that the client page, once rendered, knows what room it wants to join | |
var room = "abc123"; | |
socket.on('connect', function() { | |
// Connected, let's sign-up for to receive messages for this room | |
socket.emit('room', room); | |
}); |
{ | |
"estados": [ | |
{ | |
"sigla": "AC", | |
"nome": "Acre", | |
"cidades": [ | |
"Acrelândia", | |
"Assis Brasil", | |
"Brasiléia", | |
"Bujari", |
var gm = require('gm'); | |
var canvasWidth = 248; | |
var canvasHeight = 389; | |
gm(__dirname + '/original.jpg').size(function(error, size) { | |
if (error) { | |
console.error(error); |
var sio = require('socket.io'); | |
var fn = function () {}; | |
var http = require('http'); | |
module.exports = function (compound) { | |
var app = compound.app; | |
var server = http.createServer(app); | |
compound.server = server; | |
var io = compound.io = sio.listen(server); |
var rfc822Date = moment(yourDate).format('ddd, DD MMM YYYY HH:mm:ss ZZ') |
# Install a sneak peek of sails.js v0.9.0 (global install):
sudo npm install -g sails@git://github.com/balderdashy/sails.git#development
# Or, to revert to 0.8.94 (current stable release), you can do:
sudo npm install -g [email protected]