
var config = {
  server_port: 5000,
  server_opts: {}
};

var server = require('http').Server();
var serverio = require('socket.io').listen(server, config.server_opts);
server.listen(config.server_port);

var players = [];

var data = require('../data/apples.json');
var red = data.red,
  green = data.green;

serverio.of('/game').on('connection', function(socket) {
  // TODO: add socket

  socket.on('disconnect', function() {
    // TODO: remove socket
  });

  socket.on('authme', function() {

  });
});


var config = {
  server_port: 5000,
  server_opts: {}
};

var server = require('http').Server();
var serverio = require('socket.io').listen(server, config.server_opts);
server.listen(config.server_port);

var players = [];

var red_cards = require('../data/red.json'),
  green_cards = require('../data/green.json');

serverio.of('/game').on('connection', function(socket) {
  // TODO: add socket

  socket.on('disconnect', function() {
    // TODO: remove socket
  });

  socket.on('authme', function() {

  });
});

--- 
+++ 
@@ -10,9 +10,8 @@
 
 var players = [];
 
-var data = require('../data/apples.json');
-var red = data.red,
-  green = data.green;
+var red_cards = require('../data/red.json'),
+  green_cards = require('../data/green.json');
 
 serverio.of('/game').on('connection', function(socket) {
   // TODO: add socket
Use json file in reading
