DEV Community


Discussion on: Hosting a Node.js application on Windows with IIS as reverse proxy

scottermonk profile image

Hey Peter -
Having a new issue I wonder if you can help with.
When I change the code of my "sign_in.js" file, then go to the site, the old "Hello World" coming up. I'm betting I have something misconfigured. Hoping you are up for looking at this stuff:

module.exports = {
  apps : [{
    name: 'API',
    script: 'sign_in.js',

    // Options reference:
    args: 'one two',
    instances: 1,
    autorestart: true,
    watch: true,
    max_memory_restart: '1G',
    env: {
      NODE_ENV: 'development'
    env_production: {
      NODE_ENV: 'production'

/*  deploy : {
    production : {
      user : 'node',
      host : '',
      ref  : 'origin/master',
      repo : '',
      path : '/var/www/production',
      'post-deploy' : 'npm install && pm2 reload ecosystem.config.js --env production'

and for PM2, here's an image:
I'll also try to use their "upload image" option here that didn't work in the past for me.

petereysermans profile image
Peter Eysermans Author • Edited

Did you already figured it out? I have not encountered this problem before. Maybe kill all the processes and just start the sign_in.js app and test what IIS is serving? You probably already tried it but I would start with the simplest case and try to get it to work.

Totally unrelated but you can name your applications in pm2 when you start them with the --name <app_name> parameter. It makes it easier to identify them.

The image upload worked.

scottermonk profile image

Hey Peter -
I didn't. Then I realized - after having some other issues with Node.js and then studying Python some - that I would switch gears and learn Python instead. Proved to be easier to set up on Windows Server AND easier to write code in.
Thanks for checking in!