Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/apotox/firebase-sdk-with-netlify-functions
use Firebase Admin with Netlify lambda functions
https://github.com/apotox/firebase-sdk-with-netlify-functions
firebase netlify serverless
Last synced: about 9 hours ago
JSON representation
use Firebase Admin with Netlify lambda functions
- Host: GitHub
- URL: https://github.com/apotox/firebase-sdk-with-netlify-functions
- Owner: apotox
- License: mit
- Created: 2019-05-24T15:14:26.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-10T15:24:20.000Z (almost 2 years ago)
- Last Synced: 2023-03-08T10:53:37.418Z (over 1 year ago)
- Topics: firebase, netlify, serverless
- Language: JavaScript
- Homepage: https://safi-eddine-posts.herokuapp.com/2019-05-24_use-Firebase-Admin-with-Netlify-lambda-functions-483d3b390e3a.html
- Size: 567 KB
- Stars: 9
- Watchers: 1
- Forks: 6
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# firebase-sdk-with-netlify-functions
use Firebase Admin with Netlify lambda functionson this project I have created two parts, the first is the front-end page (static content) and the second is the backend which is a lambda function calls firebase rest api using firebaseSDK library
## webpack.server.js
this is the most important part, bundling a Nodejs Function for Netlify function or AWS Lambda with Webpack,One of the major challenges when working with serverless functions is bundling all your node_modules into one zip file, but in my case when I tried to bundle firebase SDK with my lambda function I faced a lot of errors and missed requirements.., so decided to move the big external dependencies into a new package.json file inside “lambda” folder with the help of generate-json-webpack-plugin webpack plugin. and I edited the package.json build script ,
so after the “yarn build: server” I change the directory by the command “cd dist/server/” and then “yarn install”,
this will create a new node_modules into the lambda folder and netlify will zip it using zip-it-and-ship-it to AWS lambda function.[full story](https://safi-eddine-posts.herokuapp.com/2019-05-24_use-Firebase-Admin-with-Netlify-lambda-functions-483d3b390e3a.html)