hackernews icon indicating copy to clipboard operation
hackernews copied to clipboard

HackerNews clone built with Nuxt.

Nuxt3 Hacker News

Hacker News clone built with Nuxt3.


Live Demo

Deploy

  • Universal: https://hn.nuxtjs.org

Hosted on Vercel: npm run build

  • Single Page: https://hn-spa.nuxtjs.org

Hosted on Netlify: npm run build-spa

Performance

  • Lighthouse 100/100 (Slow 4G / Mobile Moto G4)
    • Interactive: 1.4s
    • Total Blocking Time: 30ms

Features

  • Server Side Rendering
  • Vite-based hot module replacement (HMR) dev environment
  • Deploys anywhere with zero config (Vercel, Netlify, Cloudflare, etc.) powered by Nitro
  • Code Splitting
  • Prefetch/Preload JS + DNS + Data

Build Setup

Requires Node.js 14+

# install dependencies
npm install # or yarn

# serve in dev mode, with hot reload at localhost:3000
npm run dev

# build for production (universal)
npm run build

# serve in production mode (universal)
npm start

# build for production (spa)
npm run build-spa

# serve in production mode (spa)
npm run start-spa # or upload .output/public/ directory

# validate code with ESLint (with Prettier)
npm run lint

# validate and fix with ESLint (with Prettier)
npm run lintfix

Links

For the Nuxt 2 version, check out the nuxt2 branch

License

MIT

Credits

This repository is originally ported from vue-hackernews-2.0