Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions src/App/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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 => {
Expand Down