Study how server-side rendering is wired up in a Vue 2 app to make pages load faster before adopting the pattern in your own project.
Use this codebase as a reference when adding vue-router and vuex to an existing Vue app that has grown beyond simple state.
Learn how to implement route-level code splitting so users only download the JavaScript they need for each page.
Add offline support to a Vue app by copying the service worker configuration from this demo.
Requires Node.js and npm, pulls live data from the Hacker News public API, so an internet connection is needed to run it.
This is a clone of Hacker News, the technology news and discussion site, built by the Vue.js team as a demonstration project. Hacker News itself is a plain, text-heavy site, so building a polished version of it is a common way to show off a web framework's capabilities in a realistic setting. The project is built with Vue 2.0 alongside two companion tools from the same ecosystem: vue-router, which handles navigation between pages, and vuex, which manages shared data across the app. One of the main things this demo highlights is server-side rendering, which means the initial page is assembled on the server before being sent to the browser. This makes pages load faster and appear more quickly to users. Other features included are service worker support (which allows the app to work offline or on slow connections), route-level code splitting (loading only the code needed for the current page), and smooth animations when switching between views. The app also pulls live data from the real Hacker News API, so it reflects actual posts and comments. The README notes that some of these features, like code splitting and CSS extraction, are included here because this is a demo meant to show what is possible, not because they are the best choice for an app this small. It is intended as a reference for developers learning how to build server-rendered Vue applications, not as a performance benchmark.
← vuejs on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.