diff --git a/examples/with-firebase/.gitignore b/examples/with-firebase/.gitignore new file mode 100644 index 0000000000..a77c238f1c --- /dev/null +++ b/examples/with-firebase/.gitignore @@ -0,0 +1,2 @@ +node_modules +.nuxt diff --git a/examples/with-firebase/README.md b/examples/with-firebase/README.md new file mode 100644 index 0000000000..93e0ad028a --- /dev/null +++ b/examples/with-firebase/README.md @@ -0,0 +1,31 @@ +# nuxt-firebase + +> Nuxt.js with Firebase (REST API) + +[DEMO](https://nuxt-firebase.now.sh/) + +## About + +This project uses [Firebase](https://firebase.google.com/). The tools and infrastructure you need to build better apps and grow successful businesses. + +You can view the Firebase data at [https://nuxt-firebase.firebaseio.com/.json](https://nuxt-firebase.firebaseio.com/.json). This is what the App will consume. + +## Getting Started + +Download this example [or clone the repo](https://github.com/nuxt/nuxt.js): + +```bash +curl https://codeload.github.com/nuxt/nuxt.js/tar.gz/master | tar -xz --strip=2 nuxt.js-master/examples/with-firebase +cd with-firebase +``` + +Install and run: + +```bash +npm install +npm run dev + +# or with Yarn +yarn +yarn dev +``` diff --git a/examples/with-firebase/layouts/default.vue b/examples/with-firebase/layouts/default.vue new file mode 100644 index 0000000000..e7f6311105 --- /dev/null +++ b/examples/with-firebase/layouts/default.vue @@ -0,0 +1,27 @@ + + + diff --git a/examples/with-firebase/nuxt.config.js b/examples/with-firebase/nuxt.config.js new file mode 100644 index 0000000000..1c42c25517 --- /dev/null +++ b/examples/with-firebase/nuxt.config.js @@ -0,0 +1,14 @@ +module.exports = { + head: { + meta: [ + { charset: 'utf-8' }, + { name: 'viewport', content: 'width=device-width, initial-scale=1' } + ], + link: [ + { rel: 'stylesheet', href: 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css' } + ] + }, + build: { + vendor: ['axios'] + } +} diff --git a/examples/with-firebase/package.json b/examples/with-firebase/package.json new file mode 100644 index 0000000000..6f1b1f08d4 --- /dev/null +++ b/examples/with-firebase/package.json @@ -0,0 +1,20 @@ +{ + "name": "nuxt-firebase", + "version": "1.0.0", + "description": "Nuxt.js with Firebase", + "scripts": { + "dev": "nuxt", + "build": "nuxt build", + "start": "nuxt start" + }, + "keywords": [ + "nuxt", + "firebase" + ], + "author": "Charlie Hield", + "license": "MIT", + "dependencies": { + "axios": "^0.15.3", + "nuxt": "^0.9.9" + } +} diff --git a/examples/with-firebase/pages/index.vue b/examples/with-firebase/pages/index.vue new file mode 100644 index 0000000000..87fbc6bbee --- /dev/null +++ b/examples/with-firebase/pages/index.vue @@ -0,0 +1,41 @@ + + + diff --git a/examples/with-firebase/pages/users/_key.vue b/examples/with-firebase/pages/users/_key.vue new file mode 100644 index 0000000000..94a2735870 --- /dev/null +++ b/examples/with-firebase/pages/users/_key.vue @@ -0,0 +1,25 @@ + + + diff --git a/examples/with-firebase/plugins/axios.js b/examples/with-firebase/plugins/axios.js new file mode 100644 index 0000000000..9e99293f71 --- /dev/null +++ b/examples/with-firebase/plugins/axios.js @@ -0,0 +1,5 @@ +import axios from 'axios' + +export default axios.create({ + baseURL: 'https://nuxt-firebase.firebaseio.com' +})