What i mean is to get instance url at runtime in your app
As @Gli said once you push code to now, intance url will be printed on console. Notice the line https://express-now-3b57ke4d4.now.sh is printed.
https://express-now-3b57ke4d4.now.sh
Sample output
❯ now-linux
Deploying ~/code/repo/github/express-now under XXXXXXX Synced 2 files (929B) [1s] https://express-now-3b57ke4d4.now.sh [v2] [in clipboard] [1s] ┌ index.js Ready [17s] └── λ index.js (284.31KB) [sfo1] Success! Deployment ready [19s]
Visit zeit.co/now here to see more details
No no, what i mean is, inside my index.js code, i want to get the instance url like process.env.NOW_URL, like in Now V1.
index.js
process.env.NOW_URL
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
What i mean is to get instance url at runtime in your app
As @Gli said once you push code to now, intance url will be printed on console. Notice the line
https://express-now-3b57ke4d4.now.sh
is printed.Sample output
❯ now-linux
Visit zeit.co/now here to see more details
No no, what i mean is, inside my
index.js
code, i want to get the instance url likeprocess.env.NOW_URL
, like in Now V1.