nci/static/js/app/app.js
2015-04-30 18:15:23 +03:00

18 lines
393 B
JavaScript

'use strict';
define([
'underscore', 'react', 'socketio', 'dataio', 'jquery'
], function(
_, React, socketio, dataio, $
) {
var connect = dataio(socketio.connect());
var projects = connect.resource('projects');
projects.sync('read', function(err, projects) {
$('#content').html(
(err && err.message) ||
('Loaded projects: ' + _(projects).pluck('name').join(', '))
);
});
});