In js, we can create an instance and export it, what is the problem? Other files can use same instance, cannot?
Sorry, I have a question about connect-mongo. I have connected to mongo db with promise(async). mongoose .connect("mongodb://127.0.0.1:27017/shopping", { useNewUrlParser: ...
I am a C# developer. I think I can use the rules of reference type and value type in C# in C++ as well. For example in C#, classes are reference type and structs are value typ...
---------------Express---------------- We have res in req. We have req in res. app.settings, app.local.settings. req.app, res.app Isn't it hell? What the .... Nodejs developer...
export default winston.createLogger({ level: "info", format: winston.format.combine( winston.format.timestamp(), winston.format.prettyPrint(), winston.format.p...
I have a problem with cluster. I have 8 cores. It is OK and I can see the 8 workers but when I console like below, I see only worker id 8 and sometimes 6. What happened? route...
Suppose I want to encrypt and decrypt my data between the server and the client in an app like mobile app. Which one is better? 1- Only the server has a private key and public...
Hi. Suppose you intend to implement a shopping site. For initial loading, render server side and then for changing items and apply search filter, use react client side. Is it...
Hi. Suppose I want to create a blog with dynamic contents. The contents can have texts, images, videos, codes, etc. Should I store raw html with tags in the database or better...
I mean Can I use babel-node instead of node in production? "scripts":{ "build": "babel --presets es2015 src -d dist", "start": "babel-node --presets es2015 src/main.js...
So I cannot escape it and better to embrace it, next js. Thanks Another question, how does a site handle it (old shopping site) without universal app? 1-Template engine + vani...
Another question, How can I distinguish between different items in a list? For example a user wants to add an item to his/her list or remove it. Then send data to the server. ...
I can not find any comparison benchmark between redis and mongodb when I have if condition(where) queries a lot. I know I can not have where condition in redis. So it is slowe...
Isn't it better to make a text file and include all refs with absolute address inside it? So, I can access it easily from every page. If I utilize relative addresses, they are...
I thought it is a bad practice to define new tags. You mean we have a lot of standard tags like section, article, address, nav, table,... So we did not require to use ids, ins...
hi all for(var i=0;i<10;i++){ circles[i]={x:random(0,width), y:random(0,height), Initialize:function(){ this.x=random(0,w...
Is it normal to create and initialize context with state inside the constructor of the provider component in react ? I want to initialize the context with the state, so I have...
You said wondering and say it is the result of my shortcut?! what the hell. I know js and nodejs, express and mongodb as well. Why do you think I shortcut and ask useless thin...
I forgot forever and cluster forever. PM2 is awesome. One question. How can I set max_restarts and min_uptime? Do you set them? Because when my server is down according to som...
All are the same? var x={ ff(num){ } }; var x={ ff:function(num){ } }; var x={ ff:function ff(num){ } };I know it is not appropriate to have methods l...