Typescript equivalent for module.exports.handler

I’m creating an typescript express api and I want to export it

What’s the es6 equivalent for

app.use(bodyParser);
app.post('/updatestate', (req, res) => {
  const newValue = updateDatabase(res.body);
  res.json(newValue);
});

module.exports.handler = serverless(app);

in the .ts lambda file?

And if the function is deployed in http://localhost:9999/.netlify/functions/abc,
the request should me made in http://localhost:9999/.netlify/functions/abc/updatestate
to update the database?

Hey @rafael.polonio,

Your question is more of a coding question than a Netlify question. We cannot provide extended support for such, but here’s an example of a repo using Netlify Functions + TypeScript + Express: