Skip to content
Nuxt.js example for running Netlify functions locally in a dev environment and as a generated static site deployed to Netlify
Vue JavaScript CSS
Branch: master
Clone or download
marcoeh Merge pull request #4 from wearelucid/refactor/nuxt-update-and-netlif…
…y-dev

Refactor/nuxt update and netlify dev
Latest commit 106bc67 Aug 19, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets [Update] Add basic examples Feb 3, 2019
components [Fix] Netlify: Move function dependencies to main package.json since … Aug 15, 2019
functions [Fix] Netlify: Move function dependencies to main package.json since … Aug 15, 2019
layouts [Update] Deps + Setup: Use latest nuxt boilerplate Aug 15, 2019
pages [Update] Deps + Setup: Use latest nuxt boilerplate Aug 15, 2019
plugins [Update] Add basic examples Feb 3, 2019
static [Init] 🔥 Basic setup ƛ Feb 2, 2019
.editorconfig [Init] 🔥 Basic setup ƛ Feb 2, 2019
.env.example [Update] Env: Add example .env Feb 4, 2019
.eslintrc.js [Update] Deps + Setup: Use latest nuxt boilerplate Aug 15, 2019
.gitignore [Update] Example6: Add mailgun example Feb 3, 2019
.nvmrc [Update] Deps + Setup: Use latest nuxt boilerplate Aug 15, 2019
.sass-lint.yml [Init] 🔥 Basic setup ƛ Feb 2, 2019
LICENSE
README.md Update readme Aug 16, 2019
netlify.toml [Refactor] Functions: Add packages to functions and optimize for `$ n… Aug 15, 2019
nuxt.config.js [Update] Deps + Setup: Use latest nuxt boilerplate Aug 15, 2019
package.json [Fix] Netlify: Move function dependencies to main package.json since … Aug 15, 2019
yarn.lock [Fix] Netlify: Move function dependencies to main package.json since … Aug 15, 2019

README.md

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.

Testing functions locally

Thanks to the Netlify Dev command in the Netlify CLI (yarn global add nelitfy-cli), you can test your functions locally with no build step involved!

After building the app and running netlify dev or ntl dev, you can test the functions locally by hitting the endpoint http://localhost:8888/.netlify/functions/

Build Setup

# Use Node version specified in nvmrc
$ nvm use

# Install dependencies
$ yarn

# Build Nuxt app
$ yarn build

# Serve Nuxt app and Netlify functions at localhost:8888
$ netlify dev

# Generate static project
$ yarn generate
You can’t perform that action at this time.