I have following nodejs code to encrypt RSA:
const encryptWithRSA = (PublicKey, selData) => { let encrypted = crypto.publicEncrypt( {