Last active
February 27, 2022 04:25
-
-
Save Niweera/68bb048f3fb90971e96d79919c296bd5 to your computer and use it in GitHub Desktop.
XVFB to emulate a virtual display
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Xvfb from "xvfb"; | |
const runHeadless = async () => { | |
const xvfb = new Xvfb(); | |
xvfb.startSync(); | |
// run the code that needs a | |
// virtual display | |
xvfb.stopSync(); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment