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
Configure host with --host #74
Conversation
e.g. using --host 127.0.0.1 restricts incoming connections to those from localhost
@@ -34,6 +34,11 @@ | |||
:optional t | |||
:documentation "start a QVM server") | |||
|
|||
(("host") | |||
:type string | |||
:optional t |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we use :initial-value
here, or w/e the kw is, and nix the globvar?
:type string | ||
:optional t | ||
:documentation "host on which to start the QVM server") | ||
|
||
(("port" #\p) | ||
:type integer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same with here
app/src/entry-point.lisp
Outdated
@@ -190,18 +195,20 @@ Copyright (c) 2016-2019 Rigetti Computing.~2%") | |||
(or *num-workers* (max 1 (qvm:count-logical-cores)))) | |||
nil) | |||
|
|||
(defparameter *host-address* "0.0.0.0") | |||
(defparameter *default-host-address* "0.0.0.0") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nix these two defaults
app/src/entry-point.lisp
Outdated
(check-type port (or null (integer 0 65535)) | ||
"The port must be between 0 and 65535.") | ||
(when (null host) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nix
app/src/entry-point.lisp
Outdated
(check-type port (or null (integer 0 65535)) | ||
"The port must be between 0 and 65535.") | ||
(when (null host) | ||
(setf host *default-host-address*)) | ||
(when (null port) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nix
e.g. using --host 127.0.0.1 restricts incoming connections to those
from localhost