项目作者: panezhang

项目描述 :
Universal Vue SSR App Seed Project
高级语言: JavaScript
项目地址: git://github.com/panezhang/vue-ssr-universal-app.git
创建时间: 2017-12-19T09:13:27Z
项目社区:https://github.com/panezhang/vue-ssr-universal-app

开源协议:MIT License

下载


Universal Vue SSR App Seed Project

As vue-cli is an excellent scaffold to start a Vue SPA project, but to get the full benefits of Vue SSR still pains. nuxt.js is too heavy and not flexible enough, while vue-hackernews-2.0 seems a little complicated.

So, this repo is target to detail How to start a universal web app using Vue SSR with less pains.

Get Started

  • For koa server, we need a node version >= 7.6.
  • For express server, I test with node version 6.9 only.
  1. npm install
  2. ## dev with koa server, require node >= 7.6
  3. npm start
  4. # or
  5. npm run koa
  6. ## dev with express
  7. npm run express

Build

  1. ## build
  2. npm run build
  3. # run
  4. node build/server.js
  5. ## build for production, with uglify etc.
  6. NODE_ENV=prod npm run build
  7. # run
  8. NODE_ENV=prod node build/server.js

Any questions, welcome to raise an issue.