Bind to localhost?

12 views
Skip to first unread message

fake farm

unread,
Jun 1, 2023, 8:21:54 AM6/1/23
to nanoc
Hello Denis,

Is it possible to bind nanoc live to localhost to be able to view a page on a mobile phone during development? I'm imagining using it like so: 

```
nanoc live -p 3001 -b 0.0.0.0
```

Thank you for continuing to maintain an amazing tool known as nanoc!
Dave

Denis Defreyne

unread,
Jun 1, 2023, 12:36:29 PM6/1/23
to na...@googlegroups.com
Hey there,

You can use the `-o` option:

% bundle exec nanoc live --help
[snip]
    -o --host=<value>         specify the host to listen on (default:
                              127.0.0.1) (default: 127.0.0.1)
[snip]

For example:

% bundle exec nanoc live -o 0.0.0.0
[snip]
View the site at http://0.0.0.0:3000/

Admittedly, `-o` is not the best choice and I wish I had gone for `-b` instead. I’ll take a look at adding `-b` as an alternative.

Hope this helps,

--
You received this message because you are subscribed to the Google Groups "nanoc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nanoc+un...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages