Assigning ports manually to Hugo Server

I just found out that a user can assign Hugo Server ports manually using the --port flag. I should have ran the hugo server --help command earlier.

To assign ports use

hugo server --port 1314

or

hugo server -p 1314

A related tip is the --bind flag. If want to test my Hugo site from my mobile on the local network, I can do something ala:

 hugo server --bind 10.0.0.16 --baseURL http://10.0.0.16:1313
1 Like

I learnt something new. I just ran a test and it worked!

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.