Skip to content

Commit

Permalink
Merge pull request #231 from danielcardeenas/pull-230-restyled
Browse files Browse the repository at this point in the history
(Restyle) Debug URL in initializer
  • Loading branch information
danielcardeenas authored Apr 7, 2020
2 parents 5303914 + e255f3a commit 24b64ba
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/controllers/initializer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as ora from 'ora';
import { readFileSync } from 'fs';
import { Whatsapp } from '../api/whatsapp';
import { CreateConfig } from '../config/create-config';
import { isAuthenticated, isInsideChat, retrieveQR } from './auth';
Expand Down Expand Up @@ -39,5 +40,8 @@ export async function create(
waPage = await injectApi(waPage);
spinner.succeed('Whatsapp is ready');

const debugURL = `http://localhost:${readFileSync('./session/DevToolsActivePort').slice(0, -54)}`;
console.log(`\nDebug ➜ \x1b[34m${debugURL}\x1b[0m`);

return new Whatsapp(waPage);
}

0 comments on commit 24b64ba

Please sign in to comment.