Config.js port value not retained when upgrading Wappler editor

Wappler Version : 3.5.1
Operating System : mac / node

Expected behavior

lib/setup/config.js port value on Wappler upgrade

Actual behavior

port reverts to 3000

I use pm2 to manage my node apps, and current change the port value in config.js for each virtual server w/proxy back to apache…works great.

Is there a better way to manage port values? I’m assuming env variables, ya?

You should not edit the files in the lib folder unless nothing else is possible. The files in the lib folder often get updated and will overwrite your changes.

The config object in lib/setup/config.js are the defaults, you can set all of them in app/config/config.json. The default for the port is getting it from the PORT environment variable or 3000 if that is not set. The settings in the config.json will overrule it.

1 Like

There is no default config.json so I could use some help on the format to set the port.

If there is no config.json in that folder then create one with:

{
  "port": 8000
}
2 Likes