Skip to content
Projects Vue.js Projects
express-vue

express-vue

Vue rendering engine for Express.js

3.1K viewsAdded Jan 2, 2019

Vue rendering engine for Express.js

A Simple way of using Server Side rendered Vue.js 2.0+ natively in Express using streams

Installation

npm install --save express-vue

ES Modules

If using ES module statments like

export default {}
//or
import foo from "foo";

Or any other ES features you will need to also install babel-core and babel-preset-env.

npm i -D babel-core babel-preset-env 

Then place a .babelrc file in your root. here's an example targeting last two versions

{
  "presets": [
    ["env", {
      "targets": {
        "browsers": ["last 2 versions"]
      }
    }]
  ]
}

Usage

var expressVue = require("express-vue");

var app = express();

const expressVueMiddleware = expressVue.init();
app.use(expressVueMiddleware);

In your route, assuming you have a main.vue

router.get('/', (req, res, next) => {
    const data: {
        otherData: 'Something Else'
    };
    req.vueOptions: {
        head: {
            title: 'Page Title',
            metas: [
                { property:'og:title', content: 'Page Title'},
                { name:'twitter:title', content: 'Page Title'},
            ]
        }    
    }
    res.renderVue('main.vue', data, req.vueOptions);
})

Vue.js Projects

A hand-picked collection of projects made with Vue.js: UI components, input elements, apps, plugins, examples and frameworks.

Newsletter

Get the best new Vue projects in your inbox.

© 2026 vuejsprojects.com