Giter Club home page Giter Club logo

vue3-ssr-demo's Introduction

一个简易的 SSR 项目

用于学习 SSR 相关知识

拉取代码 npm start start 就可以用了

很简易的一个基于 vue 的 SSR 初步框架,没有什么太多功能

有基本的路由

加入了 pinia

使用方法 打包客户端后打服务端后 run start

npm run build:server npm run build:client npm run start

SSR

先服务端返回一个 HTML

此时页面呈现只有静态文件,没有 spa 应用相关的交互效果

浏览器监测到 script 标签后,继续发送请求

然后再返回打包好的客户端文件(水合),水合后网页后就可以有动态的交互效果

搭建了一个简易的 ssr 项目

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.