If you are using Sequlizejs for working with Postgres or MySQL with foreign key columns not set in the model definition like shown below: and you try to use create or bulkCreate on the model by providing the values of all fields including foreign key column like: Then it must be failing to insert proper …
Continue reading “Why Sequelizejs is inserting null for foreign key field?”
One of the reasons for this issue can be the order of statements. E.g, if you have mocked a module at line #5, but there are some other require statements at line #1,2,3,4, then it may be the case that the same module is used in those required modules (at line #1,2,3,4).
I spent good amount of time last week to figure out how to make Expressjs app to listen on a specific port (say, 3005) for one of the projects. Regular PM2 setup involves creating a new config block in the ecosystem file. This works for regular nodejs app, however, if your APIs are using expressjs …
Continue reading “PM2 (Node.js) not listening on specific port for Expressjs app/api”