mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
16 lines
397 B
JavaScript
16 lines
397 B
JavaScript
process.stdin.setEncoding('utf8');
|
|
process.stdin.on('data', async (input) => {
|
|
try {
|
|
const t = eval(input.toString().trim()); // eslint-disable-line no-eval
|
|
if (t instanceof Promise) console.log(await t);
|
|
else console.log(t);
|
|
} catch (e) {
|
|
console.warn(e);
|
|
}
|
|
});
|
|
|
|
require('./loader').load().catch((e) => {
|
|
console.error(e);
|
|
process.exit(1);
|
|
});
|