|
|
|
|
|
by h1d
3535 days ago
|
|
It's just that you are used to PHP. Async callbacks can be flattened with either ES6 generators or async/await by using TypeScript (Both of which require transpiling. nodejs alone would understand ES6 without it though.) It's far better to do background tasks with its parallel capability. The bigger concern is nodejs app server holds states between requests unlike PHP and as such when you define a static property on a class, it's held between all subsequent requests not giving you a clean state. I'm trying to get used to nodejs for frontend as well but you should delegate db logics down to database triggers, so you don't have to duplicate logics between different languages if you have multiple or change language later on. Same goes for keeping config files in ini format or other language agnostic format. |
|
Sounds like a tempting option amirite