redsee-server
[![Build Status](https://travis-ci.org/confuser/node-redsee-server.png?branch=master)](https://travis-ci.org/confuser/node-redsee-server) [![Coverage Status](https://coveralls.io/repos/confuser/node-redsee-server/badge.png?branch=master)](https://coverall
Last updated 5 years ago by confuser .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install redsee-server 
SYNC missed versions from official npm registry.

redsee-server

Build Status Coverage Status

Helper functions for implementing a RedSee filter server via redsee-filter

See RedSee for an example implementation along with a demo

Installation

npm install redsee-server --save

Usage

var express = require('express')
  , bodyParser = require('body-parser')
  , createClient = require('redsee-client')
  , filter = require('redsee-filter')
  , redseeServer = require('redsee-server')

module.exports = function () {
  var app = express()

  createClient(null, function (error, client) {
    var server = redseeServer(client, filter)

    app
    .use(bodyParser.urlencoded({ extended: true }))
    .use(bodyParser.json())

    // Routes
    app.post('/filter/email', server.routes.emails.create)
    app.delete('/filter/email', server.routes.emails.delete)

    app.post('/filter', server.routes.filter)

    app.post('/filter/phrase', server.routes.phrases.create)
    app.delete('/filter/phrase', server.routes.phrases.delete)

    app.post('/filter/url', server.routes.urls.create)
    app.delete('/filter/url', server.routes.urls.delete)

    app.post('/filter/word', server.routes.words.create)
    app.delete('/filter/word', server.routes.words.delete)

    app.post('/filter/ascii', server.routes.ascii.create)
    app.delete('/filter/ascii', server.routes.ascii.delete)

    app.redisClient = client
  })

}

Current Tags

  • 4.0.0                                ...           latest (5 years ago)

5 Versions

  • 4.0.0                                ...           5 years ago
  • 3.0.0                                ...           5 years ago
  • 2.0.0                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
  • 0.0.1                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (14)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |