locked
Real world nodejs app setup RRS feed

  • Question

  • There are plenty of tutorials out there on how to set up node.js app on azure. However, all of them are totally simplified, and things are much more complicated in real world. There are couple of obstacles I just could not find solution to.

    1. I need to be able to run my own commands from command line. Most common case is to run database migrations, remodelling your data, exporting etc. (I would settle if I could just call npm scripts)
    2. I need a convenient way to manage my enviroment variables. And I don't wont some Azure UI tool, as it gets harder and harder to maintain env variables. I want to have .env file, that is not commited and does not get pulled through git, but created on server. Then, I need to be able to edit it and restart process at any time.
    3. Sometimes, you need access to some programmes on running machines, such as ffmpeg for video editing or puppeteer for pdf generation etc. I would imagine azure has solutions to most of those, but if it doesn't, I need to be able to install those.
    4. Often, you need to enpower htaccess for functionality such as url rewrite, redirect, password protection etc. It does not need to be apache, but I need to be able to configure those somehow

    And there is probably more I can't think of just now.

    So given what I wrote, should I even look at fast deploy services (Web Apps, API Apps, API Management, or something I missed?), or am I better off taking VM and configuring it on my own?

    Saturday, November 9, 2019 10:14 AM

All replies

  • Hi,

    Please find the comments below:

    •   I need to be able to run my own commands from command line. Most common case is to run database migrations, remodelling your data, exporting etc. (I would settle if I could just call npm scripts)

     npm is available via command line from inside WebSSH

    •   I need a convenient way to manage my enviroment variables. And I don't wont some Azure UI tool, as it gets harder and harder to maintain env variables. I want to have .env file, that is not commited and does not get pulled through git, but created on server. Then, I need to be able to edit it and restart process at any time.

     How do we intend to create it on the server? We now have App Configuration service which you might be interested in.

    •   Sometimes, you need access to some programmes on running machines, such as ffmpeg for video editing or puppeteer for pdf generation etc. I would imagine azure has solutions to most of those, but if it doesn't, I need to be able to install those.

     You will have to build a custom container with all these tools (if deploying to linux) ... I dont think it’s possible on Windows

    •   Often, you need to enpower htaccess for functionality such as url rewrite, redirect, password protection etc. It does not need to be apache, but I need to be able to configure those somehow  

      Express Routing https://expressjs.com/en/guide/routing.html

    Tuesday, November 12, 2019 5:02 AM