Giter VIP home page Giter VIP logo

doubanmovie-ssr's Introduction

豆瓣电影服务端渲染

技术基础 Vue 2.0 + vue-router + vuex + element-ui + nodejs 服务端渲染 线上演示环境 贴一下浏览器渲染的地址吧 和浏览器端渲染对比 浏览器端doubanMovie

相关说明

可以看到,刚进来的时候是有个loading的,所以这个服务端渲染并没有完全渲染整个页面 而是选择性渲染了相关的部分。clone下源码可以发现,我所有的异步数据并没有 prePatch, 所以数据没有同步到服务端,也就是说,刚开始渲染的时候,只是返回了一些基本的dom信息 这个对于数据SEO不重要还是不错的体验方式,因为我抛弃了数据异步加载的时间。 这种方式一般适合titlemate标签的SEO

screen shot 2016-08-11 at 6 06 57 pm

Features

  • 服务器端  - Vue + vue-router + vuex working together
    • Server-side data pre-fetching
    • Client-side state & DOM hydration
    • Automatically inlines CSS used by rendered components only
  • vue 单文件组件  - Hot-reload in development
    • CSS extraction for production
  • Real-time List Updates with FLIP Animation

简单概要

screen shot 2016-08-11 at 6 06 57 pm

构建步骤

Requires Node.js 6+

# install dependencies
npm install # or yarn

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

# build for production
npm run build

# serve in production mode
npm start

doubanmovie-ssr's People

Contributors

muwoo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.