

refactor(example): remove unnecessary dependencies
@92a50e46e16c35c594b787968e5dadd05f7c4958
--- examples/javascript/index.js
+++ examples/javascript/index.js
... | ... | @@ -1,15 +1,11 @@ |
1 | 1 |
/** |
2 | 2 |
* Example provided by https://github.com/Gan-Xing in https://github.com/fedirz/faster-whisper-server/issues/26 |
3 | 3 |
*/ |
4 |
-import fs from 'fs'; |
|
4 |
+import 'dotenv/config'; |
|
5 |
+import fs from 'node:fs'; |
|
6 |
+import path from 'node:path'; |
|
5 | 7 |
import WebSocket from 'ws'; |
6 |
-import fetch from 'node-fetch'; |
|
7 |
-import FormData from 'form-data'; |
|
8 |
-import path from 'path'; |
|
9 | 8 |
import ffmpeg from 'fluent-ffmpeg'; |
10 |
-import dotenv from 'dotenv'; |
|
11 |
- |
|
12 |
-dotenv.config(); |
|
13 | 9 |
|
14 | 10 |
const ffmpegPath = process.env.FFMPEG_PATH || '/usr/bin/ffmpeg'; |
15 | 11 |
ffmpeg.setFfmpegPath(ffmpegPath); |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?