Comments (4)
@Shub1427 @acrenwelge
parameters from within the request handlers, use:
req.params.NAME
It's req.# params, not req.# param
from expressworks.
I found my mistake. It should be new Date().toDateString()
and not new Date().toString()
.
from expressworks.
Yup, I'm having the same problem too
var express = require('express');
var app = express();
var port = process.argv[2];
app.put('/message/:id', function(req,res) {
res.send(require('crypto')
.createHash('sha1')
.update(new Date().toDateString() + req.param.id)
.digest('hex'));
})
app.listen(port);
from expressworks.
Your submission results compared to the expected:
ACTUAL EXPECTED
────────────────────────────────────────────────────────────────
"56b1b7981edc3f048173b5168d4d5c59cd90b0be" != "2a604ba8cfc3c332609b71fa07688ec79cc7bf99"
────────────────────────────────────────────────────────────────
✗ Submission results did not match expected!
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().toString() + id)
.digest('hex');
res.send(str);
});
app.listen(process.argv[2]);
@smachen This solution doesn't work as well.
from expressworks.
Related Issues (20)
- Jade renamed to Pug HOT 2
- Jade challenge Error. HOT 2
- Cannot Verify Stylish CSS HOT 2
- Static HOT 1
- Exercise 4/8 "Good Old Form" does not run verification HOT 1
- PARAM PAM PAM and port to listening on HOT 1
- JSON me: Official solution fails HOT 1
- Good old form. I can't understand routes HOT 2
- Cannot pass stylish-css challenge
- Stylish CSS "run" doesn't pass but "verify" does
- Pug isn't sensed, even when it's installed
- STATIC | missed path and passed in the verification
- Upstream issue re: Pug for Exercise 3
- Install expressworks failed with npm
- Pomodoro Timer by Owen from Canada HOT 2
- All paths to resources missing
- Stylish CSS hangs on run and verify
- Bodyparser is deprecated
- Incorrect Links HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from expressworks.