-
Notifications
You must be signed in to change notification settings - Fork 37
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
Remote Usage #71
Comments
I've made a slight improvement using the ip module: I'm using express to render jade so I simple pass the ip address to the jade template import ip from 'ip';
...
app.get(`/`, (req, res) => {
if (process.env.NODE_ENV === `production`) {
res.render(`index.js`, {production: false});
} else {
res.render(`index.js`, {production: true, address: `${ip.address()}`});
}
}) And it enables the hot-reloader if (prod)
script(type='text/javascript').
SystemJS.import('./app.js');
else
script(type='text/javascript').
System.import('systemjs-hot-reloader').then(function(hr){
new hr.default('http://#{address}:8090');
});
System.import('./app.js') I'd love to see any other solutions anyone has |
This probably isn't bulletproof but it should work generally:
I have no idea why I thought that first one worked. |
I'm suggest using something like this:
|
my take:
|
Would be achieved via |
I've recently started using jspm again with hot-reloading and it's been great. One thing I'm not sure how to do efficiently is remote testing. When using the default loader, since localhost is used, there is no hot reloading on a remote system that's accessing the server, right now I simply set my dev machine's ip and everything works fine
is there another way to achieve this without having to set the ip address every time?
The text was updated successfully, but these errors were encountered: