I have a simple jquery app with a rails backend, and I am trying to run it in aws cloud9 and make several requests to the backend. Here is some sample code.
var previous = $("#previous");
previous.on('click', function() {
$.get("/games", function(data) {
console.log(data)
})
})
When I click the previous button on the page, I get this 404 error :jquery-3.2.1.min.js:4 GET https://vfs.cloud9.us-east-2.amazonaws.com/games 404 ()
I know that the route is correct, leading me to believe that there must be some other url or parameter to use when making requests in aws cloud9. Any help is greatly appreciated!