简体   繁体   中英

Using node.js modules with atom-shell

I started to have a look at the atom-shell and as documented there is a possibility to access native node modules: https://github.com/atom/electron/blob/master/docs/tutorial/using-native-node-modules.md

So is there any possibility to use those node modules from the javascript code which is executed inside the atom shell, for example to execute sql statements.

是的,这就是重点:)正确构建后,就需要本机node.js模块,就像需要基于JavaScript的模块一样。

For anyone having the same question, the remote-object can handle this:

https://github.com/atom/electron/blob/master/docs/api/remote.md

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM