Отладка node js через браузер. Visual Studio Code

Я пытаюсь запустить отладку через Visual Studio Code в браузере,но когда страница localhost открывается,с ней нет соединения.

Вот launch.json файл

{
  // Use IntelliSense to learn about possible attributes.
  // Hover to view descriptions of existing attributes.
  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
  "version": "0.2.0",
  "configurations": [
    {
      "type": "pwa-chrome",
      "request": "launch",
      "name": "Launch Chrome against localhost",
      "url": "http://localhost:8080",
      "webRoot": "${workspaceFolder}"
    }
  ]
}

После нажатия на кнопку start debugging Visual Studio Code автоматически открывает страницу,но она не доступна

введите сюда описание изображения

Запускаю код командой ts-node index.ts

Вывод получаю следующий:

{}
{
  currencies: [
    { currency: 'EUR', balance: 0 },
    { currency: 'RUB', balance: 0 },
    { currency: 'USD', balance: 1000 }
  ]
}
null
{
  orderId: '19ad1bad-abab-4b51-ba7f-6a6aa5f84b16',
  operation: 'Buy',
  status: 'Fill',
  requestedLots: 1,
  executedLots: 1
}
{
  figi: 'BBG000B9XRY4',
  ticker: 'AAPL',
  isin: 'US0378331005',
  instrumentType: 'Stock',
  balance: 1,
  blocked: 0,
  lots: 1,
  name: 'Apple'
}
{
  figi: 'BBG000B9XRY4',
  depth: 3,
  tradeStatus: 'NotAvailableForTrading',
  minPriceIncrement: 0.01,
  lastPrice: 118.56,
  closePrice: 118.69,
  limitUp: 124.52,
  limitDown: 112.6,
  bids: [],
  asks: []
}
{
  candles: [
    {
      o: 53.0325,
      c: 53.0325,
      h: 53.035,
      l: 53.025,
      v: 14200,
      time: '2019-08-19T15:39:00Z',
      interval: '1min',
      figi: 'BBG000B9XRY4'
    },
    {
      o: 53.02,
      c: 53.015,
      h: 53.035,
      l: 53.01,
      v: 18504,
      time: '2019-08-19T15:40:00Z',
      interval: '1min',
      figi: 'BBG000B9XRY4'
    },
    {
      o: 53.015,
      c: 53.015,
      h: 53.02,
      l: 53.0025,
      v: 16212,
      time: '2019-08-19T15:41:00Z',
      interval: '1min',
      figi: 'BBG000B9XRY4'
    },
    {
      o: 53.0225,
      c: 53.0325,
      h: 53.045,
      l: 53.0175,
      v: 24056,
      time: '2019-08-19T15:42:00Z',
      interval: '1min',
      figi: 'BBG000B9XRY4'
    },
    {
      o: 53.035,
      c: 53.035,
      h: 53.045,
      l: 53.03,
      v: 16600,
      time: '2019-08-19T15:43:00Z',
      interval: '1min',
      figi: 'BBG000B9XRY4'
    },
    {
      o: 53.0225,
      c: 53.0225,
      h: 53.0325,
      l: 53.02,
      v: 16108,
      time: '2019-08-19T15:44:00Z',
      interval: '1min',
      figi: 'BBG000B9XRY4'
    },
    {
      o: 53.015,
      c: 53.0225,
      h: 53.0275,
      l: 53.015,
      v: 10268,
      time: '2019-08-19T15:45:00Z',
      interval: '1min',
      figi: 'BBG000B9XRY4'
    },
    {
      o: 53,
      c: 53.01,
      h: 53.0175,
      l: 52.99,
      v: 38072,
      time: '2019-08-19T15:46:00Z',
      interval: '1min',
      figi: 'BBG000B9XRY4'
    },
    {
      o: 52.99,
      c: 52.99,
      h: 53,
      l: 52.9875,
      v: 21396,
      time: '2019-08-19T15:47:00Z',
      interval: '1min',
      figi: 'BBG000B9XRY4'
    },
    {
      o: 52.99,
      c: 52.9775,
      h: 52.99,
      l: 52.97,
      v: 31708,
      time: '2019-08-19T15:48:00Z',
      interval: '1min',
      figi: 'BBG000B9XRY4'
    }
  ],
  interval: '1min',
  figi: 'BBG000B9XRY4'
}
118.56

Но в браузере все равно страница недоступна.

Код,который отлаживаю:

import OpenAPI, { MarketInstrument } from '@tinkoff/invest-openapi-js-sdk';
const apiURL = 'https://api-invest.tinkoff.ru/openapi';
const sandboxApiURL = 'https://api-invest.tinkoff.ru/openapi/sandbox/';
const socketURL = 'wss://api-invest.tinkoff.ru/openapi/md/v1/md-openapi/ws';
const secretToken = process.env.TOKEN; // токен для боевого api
const sandboxToken = "токен"; // токен для сандбокса
const api = new OpenAPI({ apiURL: sandboxApiURL, secretToken: sandboxToken as string, socketURL });

!(async function run() {
  await api.sandboxClear();

  const marketInstrument = await api.searchOne({ ticker: 'AAPL' }) as MarketInstrument;
  const { figi } = marketInstrument;
  console.log(await api.setCurrenciesBalance({ currency: 'USD', balance: 1000 })); // 1000$ на счет
  console.log(await api.portfolioCurrencies());
  console.log(await api.instrumentPortfolio({ figi })); // В портфеле ничего нет
  console.log(await api.limitOrder({ operation: 'Buy', figi, lots: 1, price: 100 })); // Покупаем AAPL
  console.log(await api.instrumentPortfolio({ figi })); // Сделка прошла моментально
  console.log(await api.orderbookGet({ figi })); // получаем стакан по AAPL

  console.log(
    await api.candlesGet({
      from: '2019-08-19T18:38:33.131642+03:00',
      to: '2019-08-19T18:48:33.131642+03:00',
      figi,
      interval: '1min',
    }) // Получаем свечи за конкретный промежуток времени.
  );

  api.orderbook({ figi, depth: 10 }, (x) => {
    console.log(x.bids);
  });
  api.candle({ figi }, (x) => {
    console.log(x.h);
  });
})();

Ответы (0 шт):