segment-boneyard / nightmare

A high-level browser automation library.
https://open.segment.com
19.55k stars 1.08k forks source link

Recommendations regarding electron on non-self managed PaaS? #1297

Closed mexin closed 6 years ago

mexin commented 7 years ago

Hello, I was wondering if there's a way to use an electron compiled version with all system dependencies on a non-self managed service like Meteor's Galaxy? is it even possible to do this? get a "portable" version of electron to be able to run? Thing is that we cannot install anything on their PaaS and the tests we have done locally we just liked better nightmarejs instead of phantomjs (speed wise), as you can see I don't have any experience with compiled binaries on linux, hence my question.

Thanks a lot for the help!

mmsanalytics commented 6 years ago

I'm wondering the same thing.

matthewmueller commented 6 years ago

Hey folks, I haven't tried it myself, but I think this project should point you in the right direction:

https://github.com/dimkir/nightmare-lambda-tutorial#self-hosting-electron

I'm not sure what PaaS you're using but I think as long as you can stick the electron binary somewhere, you can instruct nightmare on its path:

const nightmare = Nightmare({
  electronPath: "/path/to/electron/binary"
});

Please reopen if you gave that tutorial a shot and weren't able to get it working!