Simple Node.js wrapper + samples
-
Thank you nought nought. I just tried this and it worked like a charm.
-
Thanks. Has anyone had any success getting npm and/or the node-gyp toolchain working?
-
@Christopher-Hiller Node-gyp is a tough thing to get working on the Omega I don't think the Omega has enough resources to do the compilation. One idea we've had was to pre-cross-compile some of the popular Node.js modules that require compilation and put the binaries up in a separate npm repository.
-
I like the idea of have a pre compiled library of modules instead of compiling them, but... It puts the onus on someone to make the ones that someone wants and maintain them though. Wouldn't version differences get messy?
-
@Chris-Ward Yeah, there are definitely a lot of intricacies involved. But instead of managing the versions entirely through directories and file naming conventions, we might be able to use a
git
server to do it.npm
can install modules directly from agit
repository.
-
@Dan-L. You sir, deserve a reward! Thank you so much! I can finally actually run Node JS on the Onion Omega!
-
@Austin-Kurpuis said:
@Dan-L. You sir, deserve a reward! Thank you so much! I can finally actually run Node JS on the Onion Omega!
buahahahaha. Good work
-
@Boken-Lin Just wanted to point out that the gentleman who actually created the cross-compilation toolchain I wrapped in a docker container has a script (that I not so coincidentally left in there) that should also cross-compile npm.
From there, you could define the manifests for nom packages to definitely pull pre-cross-compiled binaries. . .
-
@Theodore-Borromeo Yup, you are right! We're on it!
-
@Dan-L. Node uses NPM for installing packages. I'm fairly new to node, and I'd like to get the twit package installed. Any ideas on how to achieve this on the Omega? Thanks!
-
@Steve-Fister Since
twit
is a module that's entirely native (does not have any binary components), you can use npm to install it on your computer, and copy the file to the Omega. Here's a tarball for twit: https://s3-us-west-2.amazonaws.com/onion-cdn/community/openwrt/twit.tar.gz.
-
@Boken-Lin Thank you!