firebase-helper
is project hosting on google firebase.
Display license such as license section If you use this project API or code in your project.
You don’t need install. This project is already deployed on google firebase.
Access each url on browser, or curl
it.
https://us-central1-conao3-helper.cloudfunctions.net/hello
curl https://us-central1-conao3-helper.cloudfunctions.net/hello
Hello from Firebase!
https://us-central1-conao3-helper.cloudfunctions.net/hello_args/conao3
curl https://us-central1-conao3-helper.cloudfunctions.net/hello_args/conao3
Hello from Firebase!conao3
https://us-central1-conao3-helper.cloudfunctions.net/hello_args/:name
:name
is string
https://us-central1-conao3-helper.cloudfunctions.net/date
curl https://us-central1-conao3-helper.cloudfunctions.net/date
2019-02-03T03:15:11+00:00
https://us-central1-conao3-helper.cloudfunctions.net/github_header/firebase-helper.svg
curl http://localhost:9000/conao3-helper/us-central1/github_header/firebase-helper
<svg xmlns="http://www.w3.org/2000/svg" width="1000" height="170">
<style xmlns="http://www.w3.org/2000/svg" type="text/css">
@import url('https://fonts.googleapis.com/css?family=Sarabun:100');
text {font-size: 70px; font-family: 'Sarabun', sans-serif; font-weight: 100;}
</style>
<g>
<rect x="0" y="0" width="100%" height="100%" fill="#222"></rect>
</g>
<g fill="#fff" font-family="Open Sans">
<text x="90" y="120" font-size="50">firebase-helper</text>
</g>
</svg>
https://us-central1-conao3-helper.cloudfunctions.net/github_header/:header.svg
:header
is stringIf you use
;/?:@&=+$-_!~*.,()#'~ in ~:header
, must be URL encoded.Fail
decodeURIComponent
, or not specify argument, return svg withgithub-header
.- urlquery
?:background
is background color wuthout#
?:forground
is forground color withour#
NOW UNAVAIRABLE in FREE FIREBASE ACCOUNT
As free firebase account’s function is not allowed accessing other api, this function don’t working.
It works only localhost :)
https://us-central1-conao3-helper.cloudfunctions.net/shield_docker/conao3/po4a/name
curl https://us-central1-conao3-helper.cloudfunctions.net/shield_docker/conao3/po4a/name
<svg xmlns="http://www.w3.org/2000/svg" width="170" height="20">
<g>
<rect x="0" y="0" width="100%" height="100%" fill="#007ec6"></rect>
<rect x="0" y="0" width="86" height="100%" fill="#555"></rect>
</g>
<g fill="#fff" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
<text x="5" y="14">docker unknown</text>
<text x="128" y="14" text-anchor="middle">unknown</text>
</g>
</svg>
https://us-central1-conao3-helper.cloudfunctions.net/shield_docker/:username/:imagename/:badgetype
:username
and:imagename
use of MicroBadger.badgetype
is allowed below type- name
- layers
- size
- version
- pulls
- stars
I love OSS and I am dreaming of working on it as full-time job.
With your support, I will be able to spend more time at OSS!
All feedback and suggestions are welcome!
You can use github issues, but you can also use Slack if you want a more casual conversation.
Feel free to send PR!
# firebase-tool initialize if you need
npm install -g firebase-tools
firebase login
cd conao3-helper/functions
npm install
When functions are tested locally, access to the database and saving are done on the production data.
cf: https://firebase.google.com/docs/functions/local-emulator
Open other terminal and run it to automate build TS.
cd firebase-helper/functions/
./node_modules/.bin/tsc --watch
Serve functinos on localhost.
firebase serve --only functions --port=9000
=== Serving from '/Users/conao/Develop/git/firebase-helper'...
i functions: Preparing to emulate functions.
Warning: You're using Node.js v11.8.0 but Google Cloud Functions only supports v6.11.5.
✔ functions: hello: http://localhost:9000/conao3-helper/us-central1/hello
Access url on prompt.
curl http://localhost:9000/conao3-helper/us-central1/hello
Hellow from Firebase!
If you want to deploy your firebase, clone, fix and deploy.
git clone https://github.com/conao3/firebase-helper
cd firebase-helper/
Fix firebase project name in .firebaserc
.
diff --git a/.firebaserc b/.firebaserc
index e1571d9..3c75a00 100644
--- a/.firebaserc
+++ b/.firebaserc
@@ -1,5 +1,5 @@
{
"projects": {
- "default": "conao3-com"
+ "default": "YOUR-FIREBASE-PROJECT"
}
}
firebase deploy
Affero General Public License Version 3 (AGPLv3) Copyright (c) Naoya Yamashita - https://conao3.com https://github.com/conao3/firebase-helper.ts/blob/master/LICENSE
- Naoya Yamashita (conao3)
- Not yet… Now send PR and add your name!!