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
## | |
# Prompt setup | |
## | |
PROMPT='%F{208}%n%f in %F{226}%~%f -> ' |
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
// | |
// ViewController.swift | |
// YourAppName | |
// | |
// Created by Daniel Peach on 10/4/19. | |
// Copyright © 2019 Daniel Peach. All rights reserved. | |
// | |
import UIKit |
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
// | |
// SceneDelegate.swift | |
// YourAppName | |
// | |
// Created by Daniel Peach on 10/4/19. | |
// Copyright © 2019 Daniel Peach. All rights reserved. | |
// | |
import UIKit |
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 express = require('express'); | |
var path = require('path'); | |
var cookieParser = require('cookie-parser'); | |
var logger = require('morgan'); | |
const cors = require('cors') | |
const admin = require('firebase-admin') | |
const serviceAccount = require("./config/fbServiceAccountKey.json"); | |
admin.initializeApp({ |
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
function checkAuth(req, res, next) { | |
if (req.headers.authtoken) { | |
admin.auth().verifyIdToken(req.headers.authtoken) | |
.then(() => { | |
next() | |
}).catch(() => { | |
res.status(403).send('Unauthorized') | |
}); | |
} else { | |
res.status(403).send('Unauthorized') |
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
<template> | |
<div class="hello"> | |
<h1>{{ msg }}</h1> | |
<p class="lead mt-2">{{ authStatus }}</p> | |
<div class="d-flex my-4 justify-content-center"> | |
<button @click="signIn" class="btn btn-outline-primary mx-4">Sign In ></button> | |
<button @click="sendRequest" class="btn btn-outline-success mx-4">Send Request ></button> | |
<button @click="signOut" class="btn btn-outline-danger mx-4">Sign Out ></button> | |
</div> | |
<p class="lead">{{ response }}</p> |
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
<template> | |
<div class="hello"> | |
<h1>{{ msg }}</h1> | |
<button @click="sendRequest" class="btn btn-outline-success my-4">Send Request ></button> | |
<p class="lead">{{ response }}</p> | |
</div> | |
</template> | |
<script> | |
import axios from 'axios' |
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
methods: { | |
sendRequest() { | |
client({ | |
method: 'get', | |
url: '/' | |
}).then((res) => { | |
this.response = res.data.message | |
}).catch((error) => { | |
this.response = error | |
}) |
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 axios from 'axios' | |
const client = axios.create({ | |
baseURL: 'http://localhost:3000', | |
json: true | |
}) |
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
data: function() { | |
return { | |
response: 'No data yet...' | |
} | |
}, |
NewerOlder