$(document).ready(function() { $.ajax({ url: '/api/frontend', method: 'GET', success: function(response) { console.log(response); } }); });