{"id":18614888,"url":"https://github.com/andrewjbateman/node-firestore-restapi","last_synced_at":"2025-11-03T03:30:29.839Z","repository":{"id":96860780,"uuid":"298546644","full_name":"AndrewJBateman/node-firestore-restapi","owner":"AndrewJBateman","description":":clipboard: App to host a REST API with a Google Cloud Firestore backend","archived":false,"fork":false,"pushed_at":"2021-06-18T15:50:13.000Z","size":279,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-27T02:44:52.818Z","etag":null,"topics":["cloud-storage","google-cloud","javascript","pug-template-engine"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AndrewJBateman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-25T10:54:46.000Z","updated_at":"2022-11-01T15:27:49.000Z","dependencies_parsed_at":"2023-03-30T11:35:44.436Z","dependency_job_id":null,"html_url":"https://github.com/AndrewJBateman/node-firestore-restapi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fnode-firestore-restapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fnode-firestore-restapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fnode-firestore-restapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fnode-firestore-restapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndrewJBateman","download_url":"https://codeload.github.com/AndrewJBateman/node-firestore-restapi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239406449,"owners_count":19633024,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloud-storage","google-cloud","javascript","pug-template-engine"],"created_at":"2024-11-07T03:27:19.942Z","updated_at":"2025-11-03T03:30:29.770Z","avatar_url":"https://github.com/AndrewJBateman.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# :zap: Node Firestore Rest API\n\n* Uses Node.js to connect with Google Cloud data storage and CRUD data. This is code from Google and is stored here to learn how Google write a CRUD app.\n* **Note:** to open web links in a new window use: _ctrl+click on link_\n\n![GitHub repo size](https://img.shields.io/github/repo-size/AndrewJBateman/node-firestore-restapi?style=plastic)\n![GitHub pull requests](https://img.shields.io/github/issues-pr/AndrewJBateman/node-firestore-restapi?style=plastic)\n![GitHub Repo stars](https://img.shields.io/github/stars/AndrewJBateman/node-firestore-restapi?style=plastic)\n![GitHub last commit](https://img.shields.io/github/last-commit/AndrewJBateman/node-firestore-restapi?style=plastic)\n\n## :page_facing_up: Table of contents\n\n* [:zap: Node Firestore Rest API](#zap-node-firestore-rest-api)\n  * [:page_facing_up: Table of contents](#page_facing_up-table-of-contents)\n  * [:books: General info](#books-general-info)\n  * [:camera: Screenshots](#camera-screenshots)\n  * [:signal_strength: Technologies](#signal_strength-technologies)\n  * [:floppy_disk: Setup](#floppy_disk-setup)\n  * [:computer: Code Examples](#computer-code-examples)\n  * [:cool: Features](#cool-features)\n  * [:clipboard: Status \u0026 To-Do List](#clipboard-status--to-do-list)\n  * [:clap: Inspiration](#clap-inspiration)\n  * [:envelope: Contact](#envelope-contact)\n\n## :books: General info\n\n* This app was created using Google Cloud App Engine and a Secure Shell (SSH) terminal with access to Cloud Storage to store book data and a storage bucket for images. The code was copied into this Github repo but requires Google authentication to be able to run it from Visual Studio.\n\n## :camera: Screenshots\n\n![Example screenshot](./img/app-engine.png).\n\n## :signal_strength: Technologies\n\n* [Express v4](https://expressjs.com/) Fast, unopinionated, minimalist web framework for Node.js\n* [Multer v1](https://www.npmjs.com/package/multer) to handle multipart/form-data for uploading files.\n* [Cloud Firestore: Node.js Client](https://www.npmjs.com/package/@google-cloud/firestore) Node.js Server SDK for Google Cloud Firestore, a NoSQL document database.\n* [google-cloud/storage](https://www.npmjs.com/package/@google-cloud/storage) client for Google Cloud.\n* [pug v3](https://www.npmjs.com/package/pug) template engine for Node.js\n\n## :floppy_disk: Setup\n\n* Add Google Cloud credentials then run `npm run start` or `node server.js` for a dev server (this has not been tested).\n* Navigate to `http://localhost:5000/` or port 8080 for home screen.\n* The app will not automatically reload if you change any of the source files.\n\n## :computer: Code Examples\n\n* extract from `books/api.js` to retrieve a page of books (up to ten at a time).\n\n```javascript\nrouter.get('/', async (req, res) =\u003e {\n  const {books, nextPageToken} = await db.list(10, req.query.pageToken);\n  res.json({\n    items: books,\n    nextPageToken,\n  });\n});\n```\n\n## :cool: Features\n\n* This was all run in Google Cloud using an SSH terminal, following Google tutorial instructions and it worked first time\n* Pug makes it easier both to write reusable HTML and to render data from the books API\n\n## :clipboard: Status \u0026 To-Do List\n\n* Status: Working in the cloud\n* To-Do: nothing, this is just to study and comment Google-supplied code to learn best practises\n\n## :clap: Inspiration\n\n* [Google CLoud Getting started with Node.js](https://cloud.google.com/nodejs/getting-started)\n* [A Beginner’s Guide to Pug](https://www.sitepoint.com/a-beginners-guide-to-pug/#:~:text=Pug%20is%20a%20template%20engine,from%20a%20database%20or%20API.)\n\n## :file_folder: License\n\n* N/A.\n\n## :envelope: Contact\n\n* Repo created by [ABateman](https://github.com/AndrewJBateman), email: gomezbateman@yahoo.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewjbateman%2Fnode-firestore-restapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewjbateman%2Fnode-firestore-restapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewjbateman%2Fnode-firestore-restapi/lists"}