Skip to content

Instantly share code, notes, and snippets.

@thaisviana
Created July 31, 2020 11:19
Show Gist options
  • Save thaisviana/37579cd7ae884ea2621f0da8d3dcbad9 to your computer and use it in GitHub Desktop.
Save thaisviana/37579cd7ae884ea2621f0da8d3dcbad9 to your computer and use it in GitHub Desktop.
const express = require('express');
const router = express.Router();
// @route POST api/user
// @desc Register user
// @access Public
router.get('/',[], async (req, res) => {
try {
res.send({'msg' : 'hello'})
} catch (err) {
console.error(err.message)
res.status(500).send('Server Error')
}
})
module.exports = router;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment