Start new Node.js-based backend

This commit is contained in:
2020-05-26 16:07:52 +02:00
parent 27eb10d222
commit 7212f46191
16 changed files with 1200 additions and 43 deletions

View File

@ -4,13 +4,22 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:4200",
"webRoot": "${workspaceFolder}",
"runtimeExecutable": "/usr/bin/chromium"
}
{
"type": "firefox",
"request": "launch",
"reAttach": true,
"name": "Launch Firefox against localhost",
"url": "http://localhost:4200",
"webRoot": "${workspaceFolder}"
},
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:4200",
"webRoot": "${workspaceFolder}",
"runtimeExecutable": "/usr/bin/chromium"
}
]
}

View File

@ -2663,6 +2663,11 @@
}
}
},
"@ngx-pwa/local-storage": {
"version": "9.0.3",
"resolved": "https://registry.npmjs.org/@ngx-pwa/local-storage/-/local-storage-9.0.3.tgz",
"integrity": "sha512-lMQhrcWN/gDre2kBZQBPxoRiIwxcKzJ1JgmscwazM5BtfGY3YiFj3tndAM3ECQAOvTY/bcW98Y9g7wOHFXdO0A=="
},
"@schematics/angular": {
"version": "9.0.5",
"resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-9.0.5.tgz",

View File

@ -23,6 +23,7 @@
"@angular/platform-browser-dynamic": "~9.0.5",
"@angular/router": "~9.0.5",
"@mdi/angular-material": "^5.0.45",
"@ngx-pwa/local-storage": "^9.0.3",
"hammerjs": "^2.0.8",
"runtime-config-loader": "^2.0.0",
"rxjs": "~6.5.4",

View File

@ -1,9 +1,25 @@
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { RuntimeConfigLoaderService } from 'runtime-config-loader';
import { Entry } from './models/entry.model';
import { Observable } from 'rxjs';
@Injectable({
providedIn: 'root'
})
export class EntryServiceService {
constructor() { }
private api: string;
constructor(
private http: HttpClient,
private configSvc: RuntimeConfigLoaderService
) {
this.api = configSvc.getConfigObjectKey("api");
}
getEntries(): Observable<Array<Entry>> {
return null; // TODO
}
}

View File

@ -0,0 +1,12 @@
export class Entry {
constructor(singer_name: string, song: string, auth_cookie?: string) {
this.singer_name=singer_name;
this.song=song;
this.auth_cookie = auth_cookie;
}
singer_name: string;
song: string; //Actually the ID of the Song
auth_cookie?: string; //The "cookie" to authenticate for changing an entry. Null otherwise
}

View File

@ -35,6 +35,9 @@ export class SongSearchComponent implements OnInit {
).subscribe((filterValue: string) => {
this.updateSongs(filterValue);
});
//Für Testzwecke
this.updateSongs("Test");
}
}