Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kferrone/firebase-gas
A little website just for me.
https://github.com/kferrone/firebase-gas
Last synced: about 1 month ago
JSON representation
A little website just for me.
- Host: GitHub
- URL: https://github.com/kferrone/firebase-gas
- Owner: kferrone
- Created: 2018-10-22T02:54:16.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T10:57:07.000Z (about 2 years ago)
- Last Synced: 2024-03-17T23:50:44.858Z (10 months ago)
- Language: JavaScript
- Size: 1.29 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 27
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# My Blog Admin
Single Page App on Google Apps Script to manage the firebase blog in firestore.The base code of the app is forked from:
[gsmart-in/AppsCurryStep3](https://github.com/gsmart-in/AppsCurryStep3)## Usage
Install clasp command line tool (if you don't have it already)
```bash
npm install @google/clasp -g
```Then login to your Google account:
```bash
clasp login
```Open terminal and clone this project.
You have to create an Apps Script project to run this code.
```bash
clasp create --type standalone --title "Apps Script Single Page App Example"
```Now build the project and upload to your newly created Apps Script project
```bash
npm install
npm run deploy
```
## Local developmentYou don't have to upload the project everytime to see the changes.
run:```bash
npm run local
```
This will open a http://localhost:9090/ where you can view your development site.In order to Mock the responses from your Google Apps Script API, update client/src/services/MockBackEnd.js
## Project Structure
The client/src/pages contains the partial pages. See src/pages/routes.js where the routes are configured.
You can customize the global styles in src/pages/scss. This project uses bootstrap as CSS framework.The server/src folder contains the server side (Apps Script) code. You can use ES6 or npm modules in lib.js and any classes/files included in lib.js.
api.js exposes the Apps Script API that the client side calls (see client/src/services/GASBackEnd.js)## How does it work?
In the front end, it uses webpack and babel to cross compile and generate the bundle.
Then it uses html-webpack-inline-source-plugin to inline the whole Javascript and CSS in to the generated index.html file.
You can see the client side setup in the client/webpack.prod.js## Building the project
```bash
npm run build
```will build the local development version. The output files are placed in deploy/local folder.
```bash
npm run prod
```will build the 'production' version that is ready to be uploaded to Apps Script.
## Set Some Props From Local
```sh
clasp run 'setProperties' --params '[{"firebaseEmail":"'"$_FIREBASE_EMAIL"'","firebaseKey":"'"$_FIREBASE_KEY"'"}]'
```#### Disclaimers
The author does not represent nor associated with Google in any way. This is project is only for learning purposes.