Best practice for nodejs deployment – Directly moving node_modules to server or run npm install command

Running npm install in production server cannot be done in certain scenario (lack of compiling tools, restricted internet access, etc…) and also if you have to deploy the same project on multiple machines, can be a waste of cpu, memory and bandwidth. You should run npm install –production on a machine with the same libraries … Read more

How to store files with meta data in LoopBack?

Here’s the full solution for storing meta data with files in loopback. You need a container model common/models/container.json { “name”: “container”, “base”: “Model”, “idInjection”: true, “options”: { “validateUpsert”: true }, “properties”: {}, “validations”: [], “relations”: {}, “acls”: [], “methods”: [] } Create the data source for your container in server/datasources.json. For example: … “storage”: { … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)