This is not an official Google product
cd
intoml-talk-demos/
- Create a project in the Firebase console and install the Firebase CLI
cd
into thefrontend/
directory and runfirebase login
andfirebase init
to associate this with the Firebase project you just created. When prompted, don't overwrite existing files. Create a database and hosting project (no Functions).- In your Firebase console, click "Add Firebase to your web app". Copy the credentials to the top of the main.js file
cd
into thebackend/
directory and runnpm install
to install dependencies- Generate a service account for your project by navigating to the "Project settings" tab in your Firebase console and then selecting "Service Accouts". Click "Generate New Private Key" and save this in your
backend/
directory askeyfile.json
- Generate Twitter Streaming API credentials and copy them to
backend/local.json
- Navigate to the Cloud console for our project. Enabled the Natural Language API and generate an API key. Replace
YOUR-API-KEY
inbackend/local.json
with this key. - Replace
searchTerms
inbackend/index.js
with the search terms you'd like to filter tweets on - Replace
FIREBASE-PROJECT-ID
inbackend/local.json
with the id of your Firebase project - Run the server: from the
backend/
directory runnode index.js
. You should see tweet data being written to your Firebase database - In a separate terminal process, run the frontend: from the
frontend/
directory runfirebase serve
- Deploy your frontend: from the
frontend/
directory runfirebase deploy