Deploy the function check this url: https://us-central1-tvlk-data-mlplatform-dev.cloudfunctions.net/httpGet?name=Ahmad
This file contains 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 {action, computed, observable, runInAction} from 'mobx'; | |
import Loadable from './loadable'; | |
export default class Loadable<T> { | |
// our state entity class | |
public static create<T>(val?: T) { | |
return new Loadable<T>(val); | |
} |
This file contains 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
// Setup basic express server | |
var os = require('os') | |
var bodyParser = require('body-parser'); | |
var express = require('express'); | |
var path = require('path'); | |
var config = require('./config'); | |
var app = express(); | |
app.use(bodyParser.json()); // for parsing application/json |
This file contains 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
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: rtn-k8s-service | |
labels: | |
app: rtn-k8s | |
spec: | |
ports: | |
- port: 80 | |
targetPort: 3000 |
This file contains 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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: rtn-k8s-deployment | |
labels: | |
app: rtn-k8s | |
spec: | |
replicas: 3 | |
selector: | |
matchLabels: |
This file contains 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
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: rtn-k8s-service | |
labels: | |
app: rtn-k8s | |
spec: | |
ports: | |
- port: 80 | |
targetPort: 3000 |
This file contains 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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: rtn-k8s-deployment | |
labels: | |
app: rtn-k8s | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: |
This file contains 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
FROM node:8 | |
WORKDIR /usr/src/app | |
COPY /public /usr/src/app/public | |
COPY package.json . | |
COPY config.js . | |
COPY server.js . | |
RUN npm install |
This file contains 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
var app = new Vue({ | |
el: "#app", | |
data: { | |
connection_status: null, | |
user_id: null, | |
server_hostname : null, | |
notification_count : 0, | |
}, | |
methods: { |
This file contains 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
// Setup basic express server | |
var os = require('os') | |
var bodyParser = require('body-parser'); | |
var express = require('express'); | |
var path = require('path'); | |
var config = require('./config'); | |
var app = express(); | |
app.use(bodyParser.json()); // for parsing application/json |
NewerOlder