allow for optional port/address binding configuration
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,5 +1,6 @@
|
||||
www/data
|
||||
www/site
|
||||
www/src/output
|
||||
srv/srv_config.hy
|
||||
**/__pycache__
|
||||
**/log
|
||||
|
@ -7,7 +7,10 @@
|
||||
|
||||
(require hyrule.control [defmain])
|
||||
|
||||
(setv [ADDRESS PORT] ["127.0.0.1" 5000])
|
||||
(try
|
||||
(import srv-config [ADDRESS PORT])
|
||||
(except [ModuleNotFoundError]
|
||||
(setv [ADDRESS PORT] ["127.0.0.1" 5000])))
|
||||
|
||||
(defmain []
|
||||
(let [socket (socket AF_INET SOCK_STREAM)]
|
||||
|
Reference in New Issue
Block a user