I’m using the clementinejs boilerplate for the BaseCamp Microservices projects; currently I’m working on Timestamp.
I was able to build the entire application without the use of clementinejs, however, the instructions say to use a full stack boiler plate like clementinejs.
Without it, I used the app.get approach to allow urls like this: /witcradg/timestamp or like this: /witcradg/timestamp/123456789
app.get(’/*’, function (req, res) {
var decodedSubmission = decodeURI(req.url).slice(1);
Now I’m trying to understand the mechanism for enabling parameter passing using the approach in the clementinejs boilerplate that breaks routes into an index.js file using app.route…
app.route(’/’).get( function (req, res) {
res.sendFile(process.cwd() + ‘/public/index.html’); });
I’ve tried a number of approaches but can’t seem to get access to parameters passed on the url. I always get
Cannot GET /witcradg/timestamp/123456789
How can I solve this and where can I find documentation on the correct approach?