Skip to content

cfab/nuxt-netlify-functions-example

This branch is 53 commits behind wearelucid/nuxt-netlify-functions-example:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

edb4f4c Β· Feb 4, 2019

History

13 Commits
Feb 3, 2019
Feb 4, 2019
Feb 3, 2019
Feb 4, 2019
Feb 4, 2019
Feb 3, 2019
Feb 2, 2019
Feb 2, 2019
Feb 4, 2019
Feb 2, 2019
Feb 3, 2019
Feb 2, 2019
Feb 2, 2019
Feb 2, 2019
Feb 2, 2019
Feb 3, 2019
Feb 2, 2019
Feb 3, 2019
Feb 4, 2019
Feb 4, 2019

Repository files navigation

nuxt-netlify-functions-example

Netlify Status

Nuxt.js example for running Netlify functions locally in a dev environment and as a generated static site deployed to Netlify.

Heavily inspired by the official guide and this example.

Demo

Live demo can be found here.

Info

For the requests on the client side we use the Axios Module. To proxy locally you have to set up the Proxy Module in nuxt.config.js:

proxy: {
  '/.netlify': {
    target: 'http://localhost:9000',
    pathRewrite: { '^/.netlify/functions': '' }
  }
}

Build Setup

# Use nvm
$ nvm use

# Install dependencies
$ yarn

# Build lambda functions locally
$ yarn netlify-lambda build netlify-lambda-src

# Serve lambda functions locally
$ yarn netlify-lambda serve netlify-lambda-src

# Serve nuxt app with hot reload at localhost:3000
$ yarn dev

# Generate static project
$ yarn generate

About

Nuxt.js example for running Netlify functions locally in a dev environment and as a generated static site deployed to Netlify

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vue 63.5%
  • JavaScript 34.7%
  • CSS 1.8%