Spaces:
Paused
Paused
Download src/getDatabase.mts from jbilcke-hf/media-server: direct link, hf CLI and curl.
- Browser
- Download file 257 Bytes
-
https://huggingface.co/spaces/jbilcke-hf/media-server/resolve/main/src/getDatabase.mts
- Command line
-
hf download hf://spaces/jbilcke-hf/media-server/src/getDatabase.mts
-
curl -L -o getDatabase.mts https://huggingface.co/spaces/jbilcke-hf/media-server/resolve/main/src/getDatabase.mts
257 Bytes
| import { promises as fs } from 'node:fs' | |
| import { Database } from './types.mts' | |
| export const getDatabase = async (filePath: string): Promise<Database> => { | |
| const rawFile = await fs.readFile(filePath, 'utf8') | |
| return JSON.parse(rawFile) as Database | |
| } |