Skip to content

Commit

Permalink
fix port
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoOMaia committed Nov 26, 2023
1 parent 79ded01 commit c83f3b5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,4 @@ jobs:
with:
context: Rest_API/
push: true
tags: leoomaia/server_cloud

- name: Update Kubernetes deployment
run: |
kubectl apply -f kubernetes/deployment.yaml
tags: leoomaia/server_cloud
2 changes: 1 addition & 1 deletion Rest_API/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ def get_songs():
return jsonify({'songs': songs_data})

if __name__ == '__main__':
app.run(port=32196, host="0.0.0.0")
app.run(port=32197, host="0.0.0.0")
4 changes: 2 additions & 2 deletions Rest_API/static/scripts.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
let allSongsList = []; // Initialize as an empty array

// Fetch songs from the API
fetch('http://localhost:32196/api/songs')
fetch('http://localhost:32197/api/songs')
.then(response => {
if (!response.ok) {
throw new Error('Network response was not ok');
Expand Down Expand Up @@ -110,7 +110,7 @@ function displayRecommendations(recommendations) {
// Event listener for Find Playlist button
document.getElementById("findPlaylistBtn").addEventListener("click", async () => {
try {
const response = await fetch('http://localhost:32196/api/recommend', {
const response = await fetch('http://localhost:32197/api/recommend', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
Expand Down

0 comments on commit c83f3b5

Please sign in to comment.