npm Packages

Install Express from npm

// Name: Express Example
import "@johnlindquist/kit"
let express = await npm("express")
let detect = await npm("detect-port")
let app = express()
app.get("/", (req, res) => {
res.send(`Hello Script Kit!`)
let port = await detect()
await hide() // in case the terminal is open from installing packages
await browse(`http://localhost:${port}`)

Open express-example in Script Kit

You can terminate a long-running process like above from the menubar dropdown menu or by pressing cmd+p from the Script Kit window to list running processes.

Discuss Post