This project contains a simple demo of Moralis API Proxy with the rate-limiting per a user IP.
Required Firebase services:
- Cloud Functions (only in the "Pay as you go" billing plan).
🚀 How to Start
- Clone this repo.
- Install Firebase CLI globally:
npm install -g firebase-tools
- Login to your account:
- Get list of your projects:
firebase projects:list. If this list is empty you should add a new project. You can do it by the Firebase Console.
- Set your project ID:
firebase use <PROJECT_ID>
functions/.envand set your Moralis API key in the file.
🔌 Run Locally
- Install Java on your computer. Functions Emulator requires Java.
- Run emulators:
http://localhost:5555/in your browser.
🔥 Deploy to Production
- Activate Firestore.
- If you have any problem with the CORS on the production, probably you should allow unauthenticated HTTP function invocation. To allow unauthenticated invocation you must specify this at or after deployment. Here you can read more about it.