Replies: 6 comments 13 replies
-
No need to apologize! Welcome!
You cannot use it unmodified. This project does not implement the node API, you need to use our API for file i/o, for example.
Correct! You can look at the tests folder for some inspiration.
Yes, this will be much smaller. Note however that the standalone executable on Windows still depends on some DLLs you'll need to ship alongside your executable. I am hoping to solve that in the future.
If you use the new
That should be doable with the core APIs, without any external dependencies. Cheers! |
Beta Was this translation helpful? Give feedback.
-
Unexpected update: I solved TOTP functionality (generating and validating time-based passwords). :) My small project overview:
Right now, I need to figure out how to rewrite client logic which connects to IP:port and reads stream or Buffer of binary data to be able to run in txiki.js. TODO list:
❓ Question I'm thinking which will be simple and working solution in txiki.
Do you have maybe some advice here? |
Beta Was this translation helpful? Give feedback.
-
Reading .env is interesting! |
Beta Was this translation helpful? Give feedback.
-
Is there API like in node.js to call a function before process exits ? process.on('beforeExit', (code) => {
console.log('Process beforeExit event with code: ', code);
});
process.on('exit', (code) => {
console.log('Process exit event with code: ', code);
});
process.on('SIGINT', handle);
process.on('SIGTERM', handle);
//... |
Beta Was this translation helpful? Give feedback.
-
Also what I noticed quite significant memory consumption of (mostly) the same application running as compiled executable: |
Beta Was this translation helpful? Give feedback.
-
@saghul have you considered to make automated way (if it's possible) to install txiki.js to be more user-friendly? I mean just to run |
Beta Was this translation helpful? Give feedback.
-
Hello,
I apologize for the seemingly simple question, but I would appreciate a deeper comprehension of certain concepts of this project.
Can I use simple code/script in JS (there are no external dependencies, only few core Node.js APIs are used: net for listening on TCP port and processing binary data using Buffer API and writing to file using fs.writeFile) ?
Is it possible to run this code with txiki.js or does it require any modifications?
If i understand correctly, i need to use (in case of writing files) https://bettercallsaghul.com/txiki.js/api/interfaces/global.tjs.FileHandle.html#write global
tjs
object -->FileHandle
-->write
method as replacement of Node.jsfs
module ?Thank you for your advices.
What I want to achieve:
Beta Was this translation helpful? Give feedback.
All reactions