Categories
Node.js

Easing pain of asynchronous programming

Actually, programming in Node.js is painless as long as you keep things simple, limited to one layer of async/await. Things get complicated when you have deeper structures, using at the same time modules with async/await functionality. In general it is better to stick to one or maximum two levels of callback. If you need more, […]

Categories
Node.js

Node.js and Express.js on Heroku – deploying node.js application

The main description how you should properly deploy your app on Heroku is here: Heroku – deploying node.js. However, what is there is truth, albeit not the whole truth and following the description can make you frustrated with – for instance – something like: heroku[router]: at=error code=H10 desc=”App crashed” The initial problems are partly related […]

Categories
Node.js

How to install Node.js on Cpanel hosting

The take off your node.js app from localhost on laptop into the Internet can be a bit painful. In general shared web hostings don’t allow for hosting node.js apps. You can use however AWS, VPS, dedicated servers, Digital Ocean, A2 Hosting, NodeChef, Heroku etc, but interfaces there can be a bit confusing at start, if […]