🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

emoji-server

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

emoji-server

emoji serving middleware

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

emoji-server

add emoji to your site by adding this middleware.

var emoji = require('emoji-server')('/emoji')
                             //just pass the path you
                             //want them hosted on.
var http = require('http')

//a http server that only hosts emoji
http.createServer(emoji).listen(3000)

//inside another server
http.createServer(function (req, res) {

  if(req.url.indexOf('/emoji')
    return emoji(req, res)

  //handle other stuff etc.
  res.end('<img src=/emoji/+1.png>')

}).listen(3001)

//or works like connect/express/etc middleware

var app = require('connect')()

app.use(emoji)
app.use(function (req, res) {
  res.end('<img src=/emoji/+1.png>')
})
//add more stuff, etc

http.createServer(app).listen(3002)

License

MIT

FAQs

Package last updated on 28 Dec 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts