refactored code so node.js serves the angular app, and all the backend routes are prepended with /api/

nodejs now compressed requests
This commit is contained in:
Isaac Grynsztein
2020-02-27 22:52:50 -05:00
parent 37cc8f4fe1
commit 09bdae90e2
8 changed files with 78 additions and 34 deletions

View File

@@ -53,13 +53,14 @@ export class PlayerComponent implements OnInit {
this.id = this.route.snapshot.paramMap.get('id');
// loading config
this.postsService.loadNavItems().subscribe(result => { // loads settings
this.postsService.loadNavItems().subscribe(res => { // loads settings
const result = !this.postsService.debugMode ? res['config_file'] : res;
this.baseStreamPath = result['YoutubeDLMaterial']['Downloader']['path-base'];
this.audioFolderPath = result['YoutubeDLMaterial']['Downloader']['path-audio'];
this.videoFolderPath = result['YoutubeDLMaterial']['Downloader']['path-video'];
const backendUrl = result['YoutubeDLMaterial']['Host']['backendurl'];
this.postsService.path = backendUrl;
this.postsService.path = backendUrl + 'api/';
this.postsService.startPath = backendUrl;
this.postsService.startPathSSL = backendUrl;