UNPKG

@appsemble/node-utils

Version:

NodeJS utilities used by Appsemble internally.

12 lines (11 loc) 480 B
export declare const assetDir: import("url").URL; /** * Read a file from the server assets directory. * * @param filename The path to the file to read, relative to the assets directory. * * param encoding If specified, decode the file using this encoding. * @returns The content of the specified file. */ export declare function readAsset(filename: string): Promise<Buffer>; export declare function readAsset(filename: string, encoding: BufferEncoding): Promise<string>;