Reputation: 3207
I'm just getting started with socketstream. I tried to create a hello world app:
var http = require('http'),
ss = require('socketstream');
ss.client.define('main', {
view: 'app.html',
css: ['libs'],
code: ['app','libs'],
tmpl: '*'});
ss.http.route('/',function(req, res) {
res.serveClient('main');
});
var server = http.Server(ss.http.middleware);
server.listen(3000);
ss.start(server);
It seems to load ok, but any of the libraries I put in client/code/libs doesn't seem to be pushed to the browser.
For example, I put underscore.js in client/code/libs with a very simple html file in client/views, and all I get is:
<html>
<head></head>
<body>
bwahahahahahaha
</body>
</html>
Why is not loading/injecting the client libraries?
>
Upvotes: 0
Views: 206
Reputation: 838
The issue here is to make sure that your html page's head section includes the < socketstream/ > tag.
Upvotes: 1