File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -9,9 +9,14 @@ import languages from '../resources/languages';
99import './App.css' ;
1010
1111// Backend servers to execute code.
12- const DEV_POST_URL = 'http://localhost:5000/coderpad/execute'
13- const PROD_POST_URL = 'https://aws.dannyhp.com/coderpad/execute'
14- const POST_URL = PROD_POST_URL
12+ const EXECUTE_CODE_DEV_POST_URL = 'http://localhost:5000/coderpad/execute'
13+ const EXECUTE_CODE_PROD_POST_URL = 'https://aws.dannyhp.com/coderpad/execute'
14+ const EXECUTE_CODE_POST_URL = EXECUTE_CODE_PROD_POST_URL
15+
16+ // Backend servers to save code (Pastebin: https://github.com/dannyhp1/pastebin)
17+ const SAVE_CODE_DEV_POST_URL = 'http://localhost:5000/pastebin/save'
18+ const SAVE_CODE_PROD_POST_URL = 'https://aws.dannyhp.com/pastebin/save'
19+ const SAVE_CODE_POST_URL = SAVE_CODE_PROD_POST_URL
1520
1621// Default settings on page loadup.
1722const DEFAULT_LANGUAGE = 'python'
@@ -120,7 +125,7 @@ class App extends Component {
120125 executeCode = ( ) => {
121126 this . setRunningStatus ( )
122127
123- axios . post ( POST_URL , {
128+ axios . post ( EXECUTE_CODE_POST_URL , {
124129 language : this . state . language ,
125130 code : this . state . source [ this . state . language ] ,
126131 } ) . then ( response => {
You can’t perform that action at this time.
0 commit comments