From 8d9607dbc65466ff286fcff737308881f993abbb Mon Sep 17 00:00:00 2001 From: Janis Hutz Date: Wed, 14 Aug 2024 14:24:45 +0200 Subject: [PATCH] finish for deploy --- MusicPlayerV2-GUI/src/main.ts | 3 ++- backend/config/store-sdk.config.testing.json | 5 +++++ backend/src/app.ts | 11 ++++------- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/MusicPlayerV2-GUI/src/main.ts b/MusicPlayerV2-GUI/src/main.ts index 5e21ab7..6a55093 100644 --- a/MusicPlayerV2-GUI/src/main.ts +++ b/MusicPlayerV2-GUI/src/main.ts @@ -9,6 +9,7 @@ const app = createApp(App) app.use(createPinia()) app.use(router) -localStorage.setItem( 'url', 'http://localhost:8082' ); +// localStorage.setItem( 'url', 'http://localhost:8082' ); +localStorage.setItem( 'url', 'https://music-api.janishutz.com' ); app.mount('#app') diff --git a/backend/config/store-sdk.config.testing.json b/backend/config/store-sdk.config.testing.json index e69de29..e79afeb 100644 --- a/backend/config/store-sdk.config.testing.json +++ b/backend/config/store-sdk.config.testing.json @@ -0,0 +1,5 @@ +{ + "backendURL": "http://localhost:8083", + "name": "testing", + "signingSecret": "test" +} \ No newline at end of file diff --git a/backend/src/app.ts b/backend/src/app.ts index 9147383..841fdde 100644 --- a/backend/src/app.ts +++ b/backend/src/app.ts @@ -18,8 +18,8 @@ if ( typeof( __dirname ) === 'undefined' ) { } // TODO: Change config file, as well as in main.ts, index.html, oauth, if deploying there -const sdkConfig = JSON.parse( '' + fs.readFileSync( path.join( __dirname + '/config/sdk.config.testing.json' ) ) ); -// const sdkConfig: AuthSDKConfig = JSON.parse( '' + fs.readFileSync( path.join( __dirname + '/config/sdk.config.secret.json' ) ) ); +// const sdkConfig = JSON.parse( '' + fs.readFileSync( path.join( __dirname + '/config/sdk.config.testing.json' ) ) ); +const sdkConfig = JSON.parse( '' + fs.readFileSync( path.join( __dirname + '/config/sdk.config.secret.json' ) ) ); const run = () => { let app = express(); @@ -27,11 +27,8 @@ const run = () => { credentials: true, origin: true } ) ); - storeSDK.configure( { - backendURL: 'http://localhost:8083', - name: 'testing', - signingSecret: 'test', - } ); + // storeSDK.configure( JSON.parse( '' + fs.readFileSync( path.join( __dirname + '/config/store-sdk.config.testing.json' ) ) ) ); + storeSDK.configure( JSON.parse( '' + fs.readFileSync( path.join( __dirname + '/config/store-sdk.config.secret.json' ) ) ) ); const httpServer = createServer( app );