Skip to content

Tag: node.js

Node: util.promisify() without callback as final parameter

I’m trying to use util.promisify() to transform a function that uses a callback so I can call it with async/await: https://nodejs.org/dist/latest-v8.x/docs/api/util.html#util_util_promisify_original So far I’ve been able to use it with functions that have the callback as the final parameter, as it…

Create a css file using node js [closed]

Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 1 year ago. Improve this question I am b…

NodeJS how to create a bash like input

I want to create a nodejs cli app, where there is a shell. I have tried doing this so far: But it only works once, how do I make it work continuously? Like so: Answer That is happening because you are only calling the question function once. To ask for next input you need to call it again inside the

node js sql output

I am trying to come up with the node.js code to get the output of this query: The problem is that when I use it without the connection.escape(), I get the output, but with single quotes like this: How can I (1) get rid of the (index) column, and (2) get rid of the single quotes? Getting rid of the