Skip to content

Instantly share code, notes, and snippets.

View GrillPhil's full-sized avatar

Philipp Bauknecht GrillPhil

View GitHub Profile
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"AzureWebJobsDashboard": "UseDevelopmentStorage=true",
"AzureSignalRConnectionString": "Endpoint=INSERT_YOUR_SIGNALRSERVICE_ENDPOINT_HERE;"
}
}
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"AzureWebJobsDashboard": "UseDevelopmentStorage=true",
"AzureSignalRConnectionString": "Endpoint=INSERT_YOUR_SIGNALRSERVICE_ENDPOINT_HERE;"
},
"Host": {
"LocalHttpPort": 7071,
"CORS": "*"
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Extensions.Http;
using Microsoft.Azure.WebJobs.Extensions.SignalRService;
using Microsoft.Azure.WebJobs.Host;
namespace ServerlessRealtimeDemo
{
public static class NegotiateFunction
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Extensions.Http;
using Microsoft.Azure.WebJobs.Extensions.SignalRService;
using Microsoft.Azure.WebJobs.Host;
using System.IO;
using System.Threading.Tasks;
namespace ServerlessRealtimeDemo
import { Injectable } from "@angular/core";
import { HttpClient } from "@angular/common/http";
import { HubConnection } from '@aspnet/signalr';
import * as signalR from '@aspnet/signalr';
import { Observable } from "rxjs";
import { SignalRConnectionInfo } from "./signalr-connection-info.model";
import { map } from "rxjs/operators";
import { Subject } from "rxjs";
@Injectable()
export class SignalRConnectionInfo {
endpoint: string;
accessKey: string;
}
import { Component, OnInit } from '@angular/core';
import { SignalRService } from './signalr.service';
import { MatSnackBar } from '@angular/material';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styles: []
})
export class AppComponent implements OnInit {
<mat-form-field>
<input matInput [(ngModel)]="message" placeholder="message">
</mat-form-field>
<button mat-raised-button color="primary" (click)="send()">Send</button>
[
{
"project": {
"budget": 48000,
"budget_type": "minutes",
"created_at": "2018-05-30T09:01:27+02:00",
"customer_id": 497446,
"hourly_rate": 0,
"id": 2466576,
"name": "Customer Project A",
[
{
"time_entry": {
"billable": true,
"created_at": "2018-05-30T10:55:59+02:00",
"date_at": "2018-05-30",
"id": 61394390,
"locked": false,
"minutes": 330,
"project_id": 2466576,