Skip to content

Instantly share code, notes, and snippets.

@cuipengfei
Created December 14, 2013 11:28
Show Gist options
  • Save cuipengfei/7958135 to your computer and use it in GitHub Desktop.
Save cuipengfei/7958135 to your computer and use it in GitHub Desktop.
express work parameters
var express = require('express')
var app = express()
app.put('/message/:id', function (req, res) {
var id = req.params.id
var str = require('crypto')
.createHash('sha1')
.update(new Date().toDateString().toString() + id)
.digest('hex')
res.send(str)
})
app.listen(process.argv[2])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment