-
Notifications
You must be signed in to change notification settings - Fork 306
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
totaljs in vm (vagrant box) #11
Comments
One finding: if i start total.js with my vm's IP framework.run(http, debug, 8000, '192.168.3.3'); But i don't understand why it doesn't work for localhost. |
Hi @extropianer, localhost is defined in host file and it's routed to:
So my question: why do you need in URL localhost? |
Thanks for the quick reply! Usually when i run (node) apps in my virtual machine i can access them via 127.0.0.1 or localhost from my host machine. |
Can you access into your virtual machine via 127.0.0.1 or localhost? But when i run total.js i need to add my virtual machine IP? |
Sorry for the late reply. var express = require('express');
var app = module.exports = express();
app.get('/', function (req,res) {
res.send('hello world');
});
var port = process.env.PORT || 8000;
app.listen(port, function() {
console.log('Listening on ' + port);
}); ..everything works. So port forwarding is set up correctly. And i can access the website from outside the VM at localhost:8000 or 127.0.0.1:8000. Screenshots:
Now that i found out my VM local IP works i can start enjoying totaljs :) |
I don't know to help with it. |
Sorry to necro, but i have same problem In the spirit of keeping our dev machine as close to production, we use VM for dev server with similiar image as deploy server. For simplicity we use port forwarding on dev server (similiar to @extropianer) In my opinion, port forwarding doesn't work because totaljs binds to one listen address (default to 127.0.0.1) Is there any way to make totaljs listens to ANY (*) address? I tried using |
Try to set Thanks! |
setting thanks a lot for the solution and fast reply :) |
I have a ubuntu vm running under windows which is running the totaljs example. But i cant access them on localhost:8000 from my host machine.
If i have a minimal example with just a node server running on 8000 everything works fine. So firewall/proxy should not be a problem.
Also if i run totaljs locally on windows it works fine.
Do i need any settings to run totaljs in a vm?
The text was updated successfully, but these errors were encountered: