const express = require('express'); const router = express.Router(); const mongoose = require('mongoose'); const bcrypt = require('bcrypt');
// Hash password const hashedPassword = await bcrypt.hash(password, 12);
res.send( message: 'User created successfully' ); );
// Save user to database await user.save();
const express = require('express'); const router = express.Router(); const mongoose = require('mongoose'); const bcrypt = require('bcrypt');
// Hash password const hashedPassword = await bcrypt.hash(password, 12);
res.send( message: 'User created successfully' ); );
// Save user to database await user.save();