UNPKG

ratelimiter-distil-router

Version:

SHIELD Rate Limiter DISTIL router middleware for Web Apps

26 lines (22 loc) 709 B
/** * Copyright (c) 2018 eBay Inc. * * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at * https://opensource.org/licenses/MIT. * **/ const express = require('express'); const app = express(); /** * Use SHIELD Captcha middleware to intercept specific captcha URLs. * These URLs do NOT need to be defined on the customer application's routes. */ const shield = require('../lib'); app.use(shield()); app.get('/', function (req, res, next) { res.send('<html><body>Welcome to the DEMO landing page of SHIELD CAPTCHA</body></html>') }) app.listen(8080, () => { console.log('App Started on 8080'); });