async-listen
    TypeScript icon, indicating that this package has built-in type declarations

    2.0.2 • Public • Published

    async-listen

    listen() for use with async / await.

    Example

    import listen from 'async-listen';
    import { createServer } from 'http';
    
    async function main() {
    	const port = 3000;
    	const server = createServer();
    	const address = await listen(server, port);
    	console.log(address);
    	// URL('http://127.0.0.1:3000')
    }
    
    main().catch(console.error);

    Install

    npm i async-listen

    DownloadsWeekly Downloads

    10,802

    Version

    2.0.2

    License

    MIT

    Unpacked Size

    3.47 kB

    Total Files

    6

    Last publish

    Collaborators

    • tootallnate
    • ethan_arrowood