require ( 'dotenv' ) . config ( ) ; import express from 'express' ; import { LinkedInProfileScraper } from '../index' ; const app = express ( ) ; ( async ( ) => { const scraper = new LinkedInProfileScraper ( { sessionCookieValue : `${ process . env . LINKEDIN_SESSION_COOKIE_VALUE }` , keepAlive : true , } ) ; await scraper . setup ( ) ; app . get ( '/' , async ( req , res ) => { const urlToScrape = req . query . url as string ; const result = await scraper . run ( urlToScrape ) ; return res . json ( result ) ; } ) ; app . listen ( process . env . PORT || 3000 ) ; } ) ( ) ;