Skip to content

Conversation

g-linville
Copy link
Member

@g-linville g-linville commented Dec 4, 2024

(The test failures on this PR are nothing new.)

This implementation is compatible with Express, which is what we use in our Node-based daemon tools. The app that Express creates is compatible with the listener argument that the createServer function takes.

Example usage:

import { createServer, startServer } from '@gptscript-ai/gptscript'

const server = createServer((req, res) => {
    res.writeHead(200)
    res.end('Howdy!')
})

try {
    startServer(server)
} catch (e) {
    console.log(e)
}

Signed-off-by: Grant Linville <grant@acorn.io>
@g-linville g-linville marked this pull request as draft December 4, 2024 21:33
@g-linville g-linville marked this pull request as ready for review December 6, 2024 03:32
@g-linville g-linville merged commit 74e083d into gptscript-ai:main Dec 16, 2024
1 of 2 checks passed
@g-linville g-linville deleted the mtls branch December 16, 2024 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants