Monday 18 December 2017

What are best practices Windows server deployment techniques for NodeJS?

To set the scene, I work in a Microsoft 'enabled' business, with an application base ranging ~2-15 years behind current Microsoft technology (depending on which area of the business you are in). Some parts are 365 / Azure ... and some have the year 2005 in their build title :-/ (could be worse).For a small integration project I decided to use NodeJS instead of Powershell with the initial goal of prototyping and to facilitate deeper learning of NodeJS.The app.js logs into some websites, scrapes some data and downloads some CSV and XLS files, splits the datasets, performs some comparisons / validation on a MSSQL database for eventual loading to another database. A few things going on but not too brain busting (standard enterprise script jibber jabber). The web scraping part annoyingly has to exist due to lack of an API and no plan by the 3rd party to ever implement one!As the prototype evolved it became apparent that the application was going to end up being quite succinct due to the NodeJS packages I am using, providing bang for your buck functionality (even more succinct than what I could do in Powershell ... but spread out over a shitload more modules / files!).Due to my application being so incredibly cool, I have decided not to re-write the application in Powershell, rather directly deploy it as the Production application (support will not be a big deal for this application).I have pre-production running as a windows scheduled task executing 'babel-node app.js' out of my 'dist' directory (environment vars set to production also) but I am curious at how people would deploy this application in the wild? Is there a more acceptable / less bastardized approach than what I am currently doing here? Assume NodeJS versions installed and managed already, docker not an option in this scenario, databases are local (not Azure) thus application requires local hosting to function best.(*PowerShell overrides SSIS for me but that is a story for another day ... and our SSIS server is provisioned for heavier events thus this small applications CPU cycles can be somewhere other than there)

Submitted December 18, 2017 at 10:59AM by Faux_Real

No comments:

Post a Comment