Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aeksco/vue-netlify-lambda-prerender
:vulcan_salute: Basic starter project for a prerendered Vue frontend with a Netlify lambda function backend
https://github.com/aeksco/vue-netlify-lambda-prerender
axios netlify netlify-functions netlify-lambda pre-rendering vue vue-cli vue-router vuex
Last synced: 14 days ago
JSON representation
:vulcan_salute: Basic starter project for a prerendered Vue frontend with a Netlify lambda function backend
- Host: GitHub
- URL: https://github.com/aeksco/vue-netlify-lambda-prerender
- Owner: aeksco
- Created: 2019-03-08T00:49:56.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-03-08T01:11:48.000Z (almost 6 years ago)
- Last Synced: 2024-11-22T16:42:01.614Z (3 months ago)
- Topics: axios, netlify, netlify-functions, netlify-lambda, pre-rendering, vue, vue-cli, vue-router, vuex
- Language: JavaScript
- Homepage: https://vue-netlify-lambda-prerender.netlify.com/
- Size: 115 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# vue-netlify-lambda-prerender
This is a basic starter project for a prerendered [Vue](https://vuejs.org/) frontend with a [Netlify lambda function](https://www.netlify.com/docs/functions/) backend.
##### [You can view the deployed app here](https://vue-netlify-lambda-prerender.netlify.com/)
The Vue app is prerendered for improved SEO - you can learn more about server-side rendering and prerendering with Vue [here](https://ssr.vuejs.org/#ssr-vs-prerendering). Includes [vue-router](https://router.vuejs.org/), [vuex](https://vuex.vuejs.org), [axios](https://github.com/axios/axios), the [vue-cli-plugin-netlify-lambda](https://github.com/netlify/vue-cli-plugin-netlify-lambda), and the [prerender-spa-plugin](https://github.com/chrisvfritz/prerender-spa-plugin).
**NOTE:** this project can only be deployed via Netlify with [continuous deployment](https://www.netlify.com/docs/continuous-deployment/) enabled.
## Project setup
```
yarn install
```### Compiles and hot-reloads for development
```
yarn run serve
```### Compiles and minifies for production
```
yarn run build
```### Run your tests
```
yarn run test
```### Lints and fixes files
```
yarn run lint
```### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).### Prerendering configuration
**NOTE:** for prerendering to work correctly, routes for those pages must be added to `vue.config.js`:
```js
module.exports = {
configureWebpack: {
plugins: [
new PrerenderSPAPlugin({
staticDir: path.join(__dirname, 'dist'),
routes: [
'/',
'/about',
],
}),
],
},
};
```