const express = require('express');
const bcrypt = require('bcryptjs');
const router = express.Router();
router.post(
'/',
async (req, res) => {
let user = ({
email,
password,
} = req.body);
const salt = await bcrypt.genSalt(10);
user.password = await bcrypt.hash(user.password, salt);
return res.json(user.password);
}
);