Skip to content

Commit

Permalink
refactor: starting server with env = prod
Browse files Browse the repository at this point in the history
  • Loading branch information
gp-pereira committed Nov 24, 2024
1 parent e355fbc commit d834560
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion extensions/vscode/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,17 @@ function ensureServerCompiled(serverPath: string): Promise<void> {
function startServer(serverPath: string, port: number): ChildProcess {
return exec(
[
process.platform === "win32"
? "set MIX_ENV=prod&&"
: "export MIX_ENV=prod &&",
`cd ${serverPath} &&`,
`elixir --sname undefined -S`,
`mix run --no-halt -e`,
`"Application.ensure_all_started(:refactorex)"`,
`-- --port ${port}`,
].join(" "),
(error, stdout, stderr) => {
if (error || stderr) client.error(`Server not started\n ${error}`);
if (error || stderr) client.error(`Server not started: ${error}`);
}
);
}
Expand Down

0 comments on commit d834560

Please sign in to comment.