
Security News
PodRocket Podcast: Inside the Recent npm Supply Chain Attacks
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
@fork-anyone/node-nim
Advanced tools
node-nim
is a Node.js wrapper for the NetEase IM PC SDK, enabling you to utilize all of its features in your preferred frontend framework with native platform performance.
For comprehensive documentation, changelog, and technical support, please visit https://dev.yunxin.163.com/.
Runtime | Version |
---|---|
Electron | >= v8.5.5 |
Node.js | >= v12.13.0 |
System | Requirements |
---|---|
Windows | >= Windows 7 |
macOS | >= 10.14.0 |
Linux | glibc >= 2.23 |
Platform | Architecture |
---|---|
Windows | x64 |
Windows | ia32 |
macOS | x64 |
macOS | arm64 |
Linux | x64 |
Linux | arm64 |
node-nim
is an NPM package that can be installed using the npm install
command.
It will automatically download the prebuilt binary file that fits your current platform.
npm install node-nim --save-dev
Maybe you need to build ia32 app on x64 platform or something like that, you can use --arch
and --platform
to specify the platform you want to build.
npm install node-nim --save-dev --arch=x64 --platform=win32
npm install node-nim --save-dev --arch=ia32 --platform=win32
npm install node-nim --save-dev --arch=x64 --platform=darwin
npm install node-nim --save-dev --arch=arm64 --platform=darwin
npm install node-nim --save-dev --arch=x64 --platform=linux
npm install node-nim --save-dev --arch=arm64 --platform=linux
Technically, native nim sdk is shipped with a prebuilt node-nim.node binary file, so there is no need to build it yourself.
.
But if you want to add personal features or simply prefer to do so, feel free to build it!
Build Requirements:
Now you are all set to build, run following commands in the root directory of the project:
cmake -S . -B build
cmake --build build --config Release
And voilà, you now have your own node-nim binary file in the build
directory.
import * as node_nim from 'node-nim'
const result = node_nim.nim.client.init('appkey', '', '', {
database_encrypt_key_: 'abcdefghijklmnopqrstuvwxyz012345'
})
if (result) {
node_nim.nim.initEventHandlers() // init event handlers
node_nim.nim.talk.on('receiveMsg', (result) => {
console.log('receiveMsg', result)
})
node_nim.nim.talk.on('sendMsg', (message: node_nim.IMMessage) => {
console.log('sendMsg: ', message)
})
// add more event handlers here
// ...
}
return result
let [loginResult] = await node_nim.nim.client.login('appkey', 'account', 'password', null, '')
if (loginResult.res_code_ == node_nim.NIMResCode.kNIMResSuccess) {
console.log('login succeeded')
} else {
console.log('login failed')
}
node_nim.nim.talk.sendMsg(
{
session_type_: node_nim.NIMSessionType.kNIMSessionTypeP2P,
receiver_accid_: 'receiver',
type_: node_nim.NIMMessageType.kNIMMessageTypeText,
content_: 'Send from NIM node quick start.'
},
''
)
FAQs
NetEase IM nodejs wrapper based on NetEase IM C++ SDK
We found that @fork-anyone/node-nim demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.