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?
>
这里的问题是要确保您的html页面的头部包含<socketstream />标记。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.