tunnel.now icon indicating copy to clipboard operation
tunnel.now copied to clipboard

add API

Open andyburke opened this issue 7 years ago • 3 comments

First, this is great.

I'd like to be able to consume this via an API in my own services. For example:

if ( process.env.NODE_ENV === 'dev' ) {
    const tunnelnow = require( 'tunnel.now' );

    const tunnel_info = await tunnelnow.tunnel( {
        port: 8000
    } );

    console.log( `got a tunnel at: ${ tunnel_info.url }` );

    // sometime later...

    tunnelnow.close( tunnel_info ); // removes this tunnel deployment
}

Any interest in this? Would you accept a PR? Any hints if I want to take a stab?

andyburke avatar Sep 08 '17 10:09 andyburke

This seems like a reasonable idea! It may require a bit of a refactor - let me take a look at this and get back to you.

divmain avatar Sep 19 '17 21:09 divmain

yes, this is very good. im looking into it. have u started the progress yet. @andyburke

jjhesk avatar Apr 30 '18 18:04 jjhesk

I have not, sorry. Still interested, though.

andyburke avatar May 25 '18 02:05 andyburke