SYNC
INTEROP
1. Tell the JVM where to find the jar
2. Call it from node
3. Use it in our application
4. Go home early
const BCrypt =
Java.type("org.mindrot.jbcrypt.BCrypt");
const salt =
"$2a$10$sfMWTWROyUu5JxTEwm413u";
app.post('/login', (req, res) => {
const pass = req.query.password;
res.send(BCrypt.hashpw(pass, salt));
});
app.js