Skip to content

Commit

Permalink
Merge pull request #59 from mit-submit/main
Browse files Browse the repository at this point in the history
need to specify external port for templating js script
  • Loading branch information
mdr223 authored Sep 25, 2023
2 parents b9c187b + 5f280a2 commit 4d73ea8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion A2rchi/bin/service_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def generate_script(config):
with open(script_template, "r") as f:
template = f.read()

filled_template = template.replace('XX-HTTP_PORT-XX', str(config["PORT"]))
filled_template = template.replace('XX-HTTP_PORT-XX', str(config["EXTERNAL_PORT"]))

script_file = os.path.join(config["static_folder"], "script.js")
with open(script_file, "w") as f:
Expand Down
1 change: 1 addition & 0 deletions config/dev-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ global:
interfaces:
chat_app:
PORT: 7861
EXTERNAL_PORT: 7682
HOST: "0.0.0.0" # either "0.0.0.0" (for public) or "127.0.0.1" (for internal)
HOSTNAME: "ppc.mit.edu" # careful, this is used for the chat service
template_folder: "/root/A2rchi/A2rchi/interfaces/chat_app/templates"
Expand Down
3 changes: 2 additions & 1 deletion config/prod-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ global:

interfaces:
chat_app:
PORT: 7681
PORT: 7861
EXTERNAL_PORT: 7681
HOST: "0.0.0.0" # either "0.0.0.0" (for public) or "127.0.0.1" (for internal)
HOSTNAME: "ppc.mit.edu" # careful, this is used for the chat service
template_folder: "/root/A2rchi/A2rchi/interfaces/chat_app/templates"
Expand Down

0 comments on commit 4d73ea8

Please sign in to comment.