Twilight commited on
Commit
af95980
1 Parent(s): 77b0ce3

refactor(example): remove unnecessary dependencies

Browse files
Files changed (1) hide show
  1. examples/javascript/index.js +3 -7
examples/javascript/index.js CHANGED
@@ -1,15 +1,11 @@
1
  /**
2
  * Example provided by https://github.com/Gan-Xing in https://github.com/fedirz/faster-whisper-server/issues/26
3
  */
4
- import fs from 'fs';
 
 
5
  import WebSocket from 'ws';
6
- import fetch from 'node-fetch';
7
- import FormData from 'form-data';
8
- import path from 'path';
9
  import ffmpeg from 'fluent-ffmpeg';
10
- import dotenv from 'dotenv';
11
-
12
- dotenv.config();
13
 
14
  const ffmpegPath = process.env.FFMPEG_PATH || '/usr/bin/ffmpeg';
15
  ffmpeg.setFfmpegPath(ffmpegPath);
 
1
  /**
2
  * Example provided by https://github.com/Gan-Xing in https://github.com/fedirz/faster-whisper-server/issues/26
3
  */
4
+ import 'dotenv/config';
5
+ import fs from 'node:fs';
6
+ import path from 'node:path';
7
  import WebSocket from 'ws';
 
 
 
8
  import ffmpeg from 'fluent-ffmpeg';
 
 
 
9
 
10
  const ffmpegPath = process.env.FFMPEG_PATH || '/usr/bin/ffmpeg';
11
  ffmpeg.setFfmpegPath(ffmpegPath);