pablocattaneo
1/9/2019 - 1:57 PM

How to return a json response in Express?

const express = require('express')
const router = express.Router()

router.get('/get-users', (req, res) => {
  res.status(201).json({doc})
})