Does it run on the browser? How to?
Hi,
I've built smoke with browserify to run it on the browser (latest version of Chrome). This part seems ok since all the objects are created with no errors.
However, after the app.listen(9999) instruction nothing happens. No TCP port opened. No log traces either anywhere.
Below is the example used for testing this:
#>>>>>>>>>>>>>>> var _smokeNode = require("smoke-node");
const host = new _smokeNode.Node();
const app = host.rest.createServer()
app.get('/', async (req, res) => {
res.headers['Content-Type'] = 'text/html'
res.send("<h1>hello world</h1>");
})
app.listen(9999) <<<<<<<<<<<<<<<<<<
What are the recommended steps to run it on the browser?
Thanks, Pablo
change the client port
const resp = await node.rest.fetch(`rest://${await host.address()}:9999/`).then((r) => r.text());
may i ask a question? how to build smoke with browserify?
Wooo that is naaaa
Hiya,
Going to close this issue off as it's stale. This project has been overhauled and can now be installed via.
$ npm install @sinclair/smoke
It should run in Chrome and Firefox. Safari support may be hit or miss however. Cheers S