Skip to content

Latest commit

 

History

History
25 lines (20 loc) · 480 Bytes

File metadata and controls

25 lines (20 loc) · 480 Bytes

Plugins - Veko.js

Voir la documentation complete : docs/plugins.md

Quick Start

// plugins/my-plugin.js
module.exports = function myPlugin(app, options = {}) {
  app.use((req, res, next) => {
    // Votre middleware
    next();
  });

  app.get('/plugin-route', (req, res) => {
    res.json({ plugin: true });
  });
};
// app.js
const myPlugin = require('./plugins/my-plugin');
myPlugin(app, { option: 'value' });