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

@@ -40,7 +40,8 @@ export class AppComponent implements OnInit {
public router: Router, public overlayContainer: OverlayContainer, private elementRef: ElementRef) {
// 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.topBarTitle = result['YoutubeDLMaterial']['Extra']['title_top'];
const themingExists = result['YoutubeDLMaterial']['Themes'];
this.defaultTheme = themingExists ? result['YoutubeDLMaterial']['Themes']['default_theme'] : 'default';