Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
assets
components
data
functions
layouts
middleware
pages
plugins
static
store
.editorconfig
.gitignore
LICENSE
README.md
env.sample.js
now.json
nuxt.config.js
package.json
yarn.lock

README.md

ai-maker-api-tester

Sample application with Nuxt + Firebase (Authentication + Cloud Functions) + AI Maker API

Setup

Install dependencies

yarn

Create AI Maker Account

Login to AI Maker and get apikey.

Initialize Firebase

Create Firebase project at Firebase Console.

Setup environment variables

Copy env.sample.js to env.development.js and env.production.js and fill these environment variables.

Initialize Firebase Authentication

Enable Twitter authentication.

Initialize Cloud Functions

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

serve with hot reload at localhost:3000

yarn run dev

Deploy to Now

now

Update cors.origin and deploy functions.

build for production and launch server

yarn run build
yarn start

AI Data

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.