1.7.6 • Published 2 years ago
sir-vue v1.7.6
SIR VUE
Vue SSR renderer
For more help setting things up and using the library, check out the wiki.
Installation
$ npm install --save sir-vue vue@next express
The Most Basic Usage
First thing is to set up the folder structure:
project/
views/
Index.vue
index.js
index.js
const app = require('express')()
require('sir-vue').CreateRenderer({ app })
app.get('/', (req, res) => {
res.vue('Index.vue')
})
const server = app.listen(8080, () => {
const address = server.address()
console.log(`Listening on ${address.address}:${address.port}`)
})
views/Index.vue
<template>Hello, world!</template>