zipline/server/static.js
2021-06-23 11:20:20 -07:00

11 lines
No EOL
249 B
JavaScript

const { readFile } = require('fs/promises');
const { join } = require('path');
module.exports = async (dir, file) => {
try {
const data = await readFile(join(process.cwd(), dir, file));
return data;
} catch (e) {
return null;
}
};