Skip to content

Instantly share code, notes, and snippets.

View wataruoguchi's full-sized avatar
🦥
Curiosity Driven

Wataru Oguchi wataruoguchi

🦥
Curiosity Driven
View GitHub Profile
<template>
<ul>
<li v-for="(fact, factIdx) in facts" :key="factIdx">
{{ fact.text }}
</li>
</ul>
</template>
<script>
import axios from 'axios'
export default {
$ # move to <proj> directory and copy static assets
$ cd .. && cp -R functions/nuxt/dist/ public && cp -R src/static/* public
$ # launch firebase on localhost
$ sudo firebase serve --only hosting,functions
$ # make sure you're in <proj> directory
$ # move to src directory and build the project
$ cd src && yarn build
$ # make sure you're in <proj> directory
$ # edit the file
$ vi src/nuxt.config.js
# launch firebase on localhost
$ sudo firebase serve --only functions,hosting
$ # make sure you're in <proj> directory
$ # edit the file
$ vi firebase.json
$ # remove all html files generated. Nuxt.js will in charge of rendering
$ rm public/404.html public/index.html
$ # copy assets
$ cp -R functions/nuxt/dist public/assets
$ # copy another set of assets
$ cp -R src/static/* public