Skip to content

Tag: node.js

How to refer a variable in Node.js from another file

I am using node.js to build an app where I have a lot of static text (may change over months) in the code. I want to move the text in a separate file and refer that file data as a variable in the handler file. E.g. The above is original file code. What I want to do is move the

Add functions in other folder, to an object in this folder

I want to create an object that would import functions from another folder and it would look something like this: The functions would be inside of a different folder, however, I want to make some sort of importer in which it would make new classes for each new function/file it finds inside of the folder. some…

Express Sharp install via Docker issue

I need to use sharp. Its work fine on my workspace but if I deploymeny via docker then I get error. I am implementation all steps. I think sharp is prebuilt when first install. It uses the architecture of my computer(darwin, arm) But when it runs on the docker, although it gets built again, the work talks abo…