This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func StaticFileServer(r chi.Router, public string, static string) { | |
| // everything up to the r.Get call is executed the first time the function is called | |
| if strings.ContainsAny(public, "{}*") { | |
| panic("FileServer does not permit URL parameters.") | |
| } | |
| root, _ := filepath.Abs(static) | |
| if _, err := os.Stat(root); os.IsNotExist(err) { | |
| panic("Static Documents Directory Not Found") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: "3.0" | |
| services: | |
| # Core Spring Boot Application | |
| app: | |
| build: | |
| context: .. | |
| dockerfile: ./Dockerfile | |
| image: "rx_mongo_example" | |
| env_file: | |
| - .env |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #################### | |
| ### Node Setup ### | |
| #################### | |
| FROM node:10.13-alpine as node-angular-cli | |
| #Linux setup | |
| RUN apk update \ | |
| && apk add --update alpine-sdk \ | |
| && apk del alpine-sdk \ | |
| && rm -rf /tmp/* /var/cache/apk/* *.tar.gz ~/.npm \ | |
| && npm cache verify \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <mat-grid-list *ngIf="teams !== undefined && teams.length > 0" | |
| cols="2" | |
| rowHeight="2:1"> | |
| <mat-grid-tile *ngFor="let team of teams" class="grid-fit"> | |
| <app-team-card [team]="team"></app-team-card> | |
| </mat-grid-tile> | |
| </mat-grid-list> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export class TeamCardComponent implements OnInit { | |
| @Input() | |
| team: TeamModel; | |
| constructor() { | |
| } | |
| ngOnInit() { | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export class MatchupComponent implements OnInit { | |
| teams: TeamModel[] = []; | |
| constructor(private teamService: TeamService) { | |
| } | |
| ngOnInit() { | |
| this.loadTeams(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private teamWatchSource = new BehaviorSubject(new TeamModel()); | |
| _teamWatchSource: Observable<TeamModel> = this.teamWatchSource.asObservable(); | |
| constructor(private http: HttpClient, private zone: NgZone) { | |
| this.getTeamsStream().subscribe(data => { | |
| this.teamWatchSource.next(new TeamModel().deserialize(data)); | |
| }, error => console.log('Error: ' + error), | |
| () => console.log('done loading team stream')); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private teamWatchSource = new BehaviorSubject(new TeamModel()); | |
| _teamWatchSource: Observable<TeamModel> = this.teamWatchSource.asObservable(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import {Injectable, NgZone} from '@angular/core'; | |
| import {environment} from '../../environments/environment'; | |
| import {BehaviorSubject, Observable} from "rxjs"; | |
| import {TeamModel} from "../models/team.model"; | |
| @Injectable({ | |
| providedIn: 'root' | |
| }) | |
| export class TeamService { | |
| private teamsWatchUrl = environment.backendUrl + environment.watchTeamsPath; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Enforces a deserialize method to ensure a model class | |
| * can construct itself from a JSON string | |
| */ | |
| export interface Deserializable { | |
| deserialize(input: any): this; | |
| } |
NewerOlder