July 1, 2020
You can execute a shell script with Node.js without even installing any packages.
const { spawn } = require('child_process')
spawn('git clone https://github.com/benborgers/potion && cd potion', {
shell: true
})
The shell: true
option allows you to execute any command, like you would on the command line.
For more options, like specifying which directory to execute the command in, check out the official Node.js documentation.
Tufts Meal Plan Wrapped
Mar 2, 2024
Building an e-ink picture frame that displays an iCloud photo album
Jan 9, 2024
2023 in review
Jan 5, 2024
Subscribe to my newsletter for a monthly round-up of new blog posts and projects Iām working on!