2023-12-25 22:44:16 +00:00
|
|
|
import { error, handleData, log } from "./lsp";
|
|
|
|
|
|
|
|
console.log = log;
|
|
|
|
|
2024-02-29 15:39:13 +00:00
|
|
|
log('Started the server logging');
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
log('Listening for Input')
|
|
|
|
process.stdin.resume();
|
|
|
|
} catch (e: any) {
|
|
|
|
log('failed to listen to the stdin');
|
|
|
|
log(e.toString());
|
|
|
|
throw e;
|
|
|
|
}
|
2023-12-25 22:44:16 +00:00
|
|
|
|
|
|
|
process.stdin.on('data', function(data) {
|
2024-02-29 15:39:13 +00:00
|
|
|
log('Got the data function');
|
|
|
|
try {
|
|
|
|
handleData(data);
|
|
|
|
} catch (e) {
|
|
|
|
log("got here")
|
|
|
|
error("TRY GOT ERROR:" + e)
|
|
|
|
}
|
2023-12-25 22:44:16 +00:00
|
|
|
})
|