Sample application with Nuxt + Firebase (Authentication + Cloud Functions) + AI Maker API
yarn
Login to AI Maker and get apikey.
Create Firebase project at Firebase Console.
Copy env.sample.js
to env.development.js
and env.production.js
and fill these environment variables.
Enable Twitter authentication.
Enable Cloud Functions.
Initialize Cloud Functions for JavaScript.
npm install -g firebase-tools
firebase login
firebase init functions
Set config variables.
firebase functions:config:set cors.origin=http://localhost:3000
firebase functions:config:set ai_maker.apikey=apikeygotfromaimaker
And deploy functions.
firebase deploy --only functions
yarn run dev
now
Update cors.origin and deploy functions.
yarn run build
yarn start
AI List is defined in data/ai.js. If you want to add, just add to list.
For detailed explanation on how things work, checkout Nuxt.js docs.