Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to browserify socket.io-stream.js? #45

Closed
xiaoshao opened this issue Apr 25, 2015 · 3 comments
Closed

How to browserify socket.io-stream.js? #45

xiaoshao opened this issue Apr 25, 2015 · 3 comments

Comments

@xiaoshao
Copy link

I do it as your introduce on the README to browserify. But When I reference it with src = '/js/socket.io-stream.js' or 'socket.io-stream/socket.io-stream.js', My browser complain that can't get the resource.

note: I start my server with node app.js.

var app = require("express")();
var http = require("http").Server(app);
var io = require("socket.io")(http);
var fs = require("fs");
//var ss = require("socket.io-steam");
var sockets = {};

app.get("/", function (req, resp) {
resp.sendFile(__dirname + "/view/message.html");
});

http.listen(3000, function () {
console.log("listening on 3000");
});

@nkzawa
Copy link
Owner

nkzawa commented Apr 28, 2015

Where did you create the file? It has to be accessible from browser.

@xiaoshao
Copy link
Author

xiaoshao commented May 1, 2015

I have to add app.get('/socket.io-stream.js', function().....); in order my browser can get socket.io-stream.js.

@nkzawa
Copy link
Owner

nkzawa commented May 31, 2015

looks solved :)

@nkzawa nkzawa closed this as completed May 31, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants