TransforMap / data.transformap.co

Here you find a Node.js daemon to serve the public TransforMap web service.
https://data.transformap.co
GNU Affero General Public License v3.0
7 stars 2 forks source link

replaced Americano by server/start.js, using Express directly #51

Closed maxlath closed 6 years ago

maxlath commented 6 years ago

Dear transformapers, @almereyda my love, Please find this small re-factoring of the server structure we worked on together at the wan light of a cold winter 19 months ago. What is expected from those changes:

I hope you're well, Bests, Cordialement, Liebe Grüße,

Yours truly

maxlath commented 6 years ago

@jum-s it's the same syntax: the line

app[verb](`/${endpoint}`, controller)

will make this route equivalent to

app.get('/hello', function (req, res, next) {
  var name = req.query.name || 'you'
  res.json({ hello: name })
})
almereyda commented 6 years ago

Yay!