Skip to content

Commit

Permalink
moved remain functionality to serve script
Browse files Browse the repository at this point in the history
  • Loading branch information
martetassyns committed Dec 6, 2024
1 parent 500d655 commit dc101a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 0 additions & 5 deletions script/develop_and_serve
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,4 @@ fi

./script/develop &

if [ -n "$DEVCONTAINER" ]; then
nodeCoreUrl="${coreUrl/localhost/host.docker.internal}"
else
nodeCoreUrl="$coreUrl"
fi
yarn serve "$@"
5 changes: 4 additions & 1 deletion script/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ const parsedArguments = {
...minimist(process.argv.slice(2)),
};

const coreUrl = parsedArguments.c;
const coreUrl =
process.env.DEVCONTAINER !== undefined
? parsedArguments.c.replace("/localhost:", "/host.docker.internal:")
: parsedArguments.c;
const port = parseInt(parsedArguments.p);

const repoDir = path.join(fileURLToPath(import.meta.url), "../..");
Expand Down

0 comments on commit dc101a5

Please sign in to comment.