Created
December 14, 2013 11:28
-
-
Save cuipengfei/7958135 to your computer and use it in GitHub Desktop.
express work parameters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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