Skip to content

Saabbir/dadjokes

Repository files navigation

Dad Jokes

Playing with nuxtjs and https://icanhazdadjoke.com/ api.

Demo can be seen in here - https://saabbir.github.io/dadjokes/

Things I learned by doing this project

  • How to install nuxtjs
  • Nuxtjs directory structure
  • Nuxtjs automatic routes
  • How to use NuxtLink component
  • Nuxtjs auto import components feature
  • How to use nuxt head() method to set page meta tags
  • How to create an error page
  • Nuxtjs context object
  • Nuxtjs asyncData() lifecycle hook method
  • Global CSS configuration

Build Setup

# install dependencies
$ npm install

# serve with hot reload at localhost:3000
$ npm run dev

# build for production and launch server
$ npm run build
$ npm run start

# generate static project
$ npm run generate

For detailed explanation on how things work, check out Nuxt.js docs.