Confusion in node and its ouput | w/o browser

Hello there,

Node JS is a server-side language. Here is one API β†’ https://github.com/giventofly/pixelit

this is delivering output in Browser, I think, though not tried this can be used to render output in the browser through HTTP responses when using node.

But is it possible to completely use such node APIs in CMD/GitBash/Console, even the output such as pixelated images should deliver in CMD or console w/o the need for a browser.

How will you show an image in a console?

Or what do you want to do?

1 Like

Maybe whatever I am trying is not possible.

I mean, you can certainly have node output image data into a file, which you then open in a file explorer or whatever. The console itself is incapable of showing pictures, not because of Node, but because Console is a text medium.

1 Like

Thanks, so the Node script that I have cited how can I deliver its output as file through CMD w/o opening anything in browser?

Correct.

You can start your node script in the terminal with

node run scriptname

1 Like

Do you mean node app.js, for example? This will run that script in the terminal.

I have cloned the repository still I could not connect the dot with HTML or how to pass that image URL w/o accessing it in the browser.

w/o accessing the browser I have to pass the correct URL here β†’

also as far I have experienced nodeJS can’t interpret dom things such as: document.getElementById and the script is using the same this may generate error in terminal.

of course not because there is no DOM.

Maybe you should tell us more about what you want to do. Looks weird.

1 Like