Added PRODUCTION env variable to client

This commit is contained in:
2021-03-04 10:53:13 +11:00
parent 488f975e98
commit dccf55c973
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ const route = async (req, res) => {
try {
//reserve the UUID with the chat server (hop 1)
const result = await fetch(`http://${process.env.CHAT_URI}/reserve`, { method: 'POST', body: form });
const result = await fetch(`http${process.env.PRODUCTION ? 's' : ''}://${process.env.CHAT_URI}/reserve`, { method: 'POST', body: form });
if (result.status == 200) {
const json = await result.json();