boo*_*awa 1 node.js secret-key jwt cryptojs
我试图通过在终端中运行以下命令来生成密钥: node require('crypto').randomBytes(64).toString('hex')
node require('crypto').randomBytes(64).toString('hex')
我在服务器运行时在另一个选项卡上执行此操作,但将其作为输出: zsh: unknown file attribute: h
zsh: unknown file attribute: h
我在这里做错了什么?TIA
Dam*_*ian 5
运行node命令并按 Enter 键进入 REPL 模式。您可以输入require('crypto').randomBytes(64).toString('hex'). 抛出错误是因为后面的字符node被解释为传递给命令的选项。
node
require('crypto').randomBytes(64).toString('hex')
归档时间:
4 年,6 月 前
查看次数:
2012 次
最近记录: