This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<ul> | |
<li v-for="(fact, factIdx) in facts" :key="factIdx"> | |
{{ fact.text }} | |
</li> | |
</ul> | |
</template> | |
<script> | |
import axios from 'axios' | |
export default { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"rewrites": [ | |
{ | |
"source": "**", | |
"function": "nuxtApp" | |
} | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ # make sure you're in <proj> | |
$ # deploy! | |
$ firebase deploy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ # 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ # make sure you're in <proj> directory | |
$ # move to src directory and build the project | |
$ cd src && yarn build |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ # make sure you're in <proj> directory | |
$ vi functions/index.js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ # make sure you're in <proj> directory | |
$ # edit the file | |
$ vi src/nuxt.config.js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# launch firebase on localhost | |
$ sudo firebase serve --only functions,hosting |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ # make sure you're in <proj> directory | |
$ # edit the file | |
$ vi firebase.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ # 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 |