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/data
|
||||||
www/site
|
www/site
|
||||||
www/src/output
|
www/src/output
|
||||||
|
srv/srv_config.hy
|
||||||
**/__pycache__
|
**/__pycache__
|
||||||
**/log
|
**/log
|
||||||
|
@ -7,7 +7,10 @@
|
|||||||
|
|
||||||
(require hyrule.control [defmain])
|
(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 []
|
(defmain []
|
||||||
(let [socket (socket AF_INET SOCK_STREAM)]
|
(let [socket (socket AF_INET SOCK_STREAM)]
|
||||||
|
Reference in New Issue
Block a user