-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Custom dev ui port(load env from .env) #2702
Conversation
I update a lot of code:
|
6f8dd90
to
bdf06dd
Compare
It's late now, I'm going to sleep. I'll fix these later. |
If I use node:fs, then I have to mock node:fs and fs in the same time.
Most are fixed but not 'node:fs’ |
@@ -17,8 +18,7 @@ export const loadEnv = () => { | |||
for (let i = 0; i < dotenvFiles.length; i++) { | |||
const dotenvFile = dotenvFiles[i] | |||
if (fs.existsSync(dotenvFile)) { | |||
dotenv.config({ path: dotenvFile }) | |||
break | |||
dotenvExpand.expand(dotenv.config({ path: dotenvFile, override: false })) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dotenvExpand makes ENV_2=${ENV_1}
possible.
With the PR, we can not auto-start ui with another port when run the command |
I've change the start task for
So |
My main concern currently is to avoid introducing the complexity of @Keith-CY @yanguoyu @devchenyan @JeffreyMa597 @homura , what do you think? If we all agree to introduce
|
It may be cumbersome to share an |
Currently, we are not sharing the environment variables themselves, but rather the |
I strongly agree, and |
Packaging for test is done in 5320392944 for commit 36c1621 . |
Will this PR be updated according to the comments above? |
OS: Windows 10
When I run
yarn start
, I getSomething is already running on port 3000.
.It's good if I can customize the dev port.
P.S. I am sure there is no server running on port 3000 because I just restarted my computer. Maybe something is broken but I no time to figure it out, so custimzation of port is needed for me.