etnbrd/flx-compiler

View on GitHub
prototypes/express/src/main-simple.js

Summary

Maintainability
A
0 mins
Test Coverage
var app = require('express')();

var count = {};

app.get('/:id', function(req, res){
  res.send(req.params.id + '[' + (count[req.params.id] = (count[req.params.id] + 1) || 1 ) + ']');
});

port = 8080;
app.listen(port);
console.log("Listening port: "+port);