# env.get('PORT') not working anymore

**URL:** https://discourse.nodered.org/t/env-get-port-not-working-anymore/74941
**Category:** General
**Tags:** function-node
**Created:** [9 February 2023 13:53 UTC](https://discourse.nodered.org/t/env-get-port-not-working-anymore/74941 "2023-02-09T13:53:13Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![henkkas](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/henkkas/32/39844_2.png) [@henkkas](https://discourse.nodered.org/u/henkkas)
#### Post date: [9 February 2023 13:53 UTC](https://discourse.nodered.org/t/env-get-port-not-working-anymore/74941/1 "2023-02-09T13:53:13Z")

</div>

For some reason the instruction `env.get('PORT')` is not working anymore. I cannot figure out why.  
It used to work in the past.

In my older project I had this entry in the settings.js `process.env.PORT = 1880`

Now I have this entry `uiPort: process.env.PORT || 1880,`

Anyone has any idea why?

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [10 April 2023 13:53 UTC](https://discourse.nodered.org/t/env-get-port-not-working-anymore/74941/2 "2023-04-10T13:53:49Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
