From 40cd17a6542ffdb8489b90116ebc82727074defe Mon Sep 17 00:00:00 2001 From: Danny Pham Date: Thu, 20 Feb 2020 20:41:23 -0800 Subject: [PATCH 1/2] Update PROD endpoint to new AWS server. --- src/App/App.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App/App.js b/src/App/App.js index 6ea7b4c..1bb3a80 100644 --- a/src/App/App.js +++ b/src/App/App.js @@ -10,7 +10,7 @@ import './App.css'; // Backend servers to execute code. const DEV_POST_URL = 'http://localhost:5000/coderpad/execute' -const PROD_POST_URL = 'https://dev.dannyhp.com:8443/execute' +const PROD_POST_URL = 'https://aws.dannyhp.com/coderpad/execute' const POST_URL = PROD_POST_URL // Default settings on page loadup. From 35e6a7cfae1c591a40227439f37d24f779c08842 Mon Sep 17 00:00:00 2001 From: Danny Pham Date: Sat, 14 Mar 2020 01:03:49 -0700 Subject: [PATCH 2/2] Added pastebin endpoint; preparing to allow saving functionality. --- src/App/App.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/App/App.js b/src/App/App.js index 1bb3a80..140836c 100644 --- a/src/App/App.js +++ b/src/App/App.js @@ -9,9 +9,14 @@ import languages from '../resources/languages'; import './App.css'; // Backend servers to execute code. -const DEV_POST_URL = 'http://localhost:5000/coderpad/execute' -const PROD_POST_URL = 'https://aws.dannyhp.com/coderpad/execute' -const POST_URL = PROD_POST_URL +const EXECUTE_CODE_DEV_POST_URL = 'http://localhost:5000/coderpad/execute' +const EXECUTE_CODE_PROD_POST_URL = 'https://aws.dannyhp.com/coderpad/execute' +const EXECUTE_CODE_POST_URL = EXECUTE_CODE_PROD_POST_URL + +// Backend servers to save code (Pastebin: https://github.com/dannyhp1/pastebin) +const SAVE_CODE_DEV_POST_URL = 'http://localhost:5000/pastebin/save' +const SAVE_CODE_PROD_POST_URL = 'https://aws.dannyhp.com/pastebin/save' +const SAVE_CODE_POST_URL = SAVE_CODE_PROD_POST_URL // Default settings on page loadup. const DEFAULT_LANGUAGE = 'python' @@ -120,7 +125,7 @@ class App extends Component { executeCode = () => { this.setRunningStatus() - axios.post(POST_URL, { + axios.post(EXECUTE_CODE_POST_URL, { language: this.state.language, code: this.state.source[this.state.language], }).then(response => {