Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d76737b

Browse files
authored
fix: Adjust ./develop.sh script to run in ./site (#142)
Hopefully the last thing I missed in #128 ... this fixes the `./develop.sh` script and `site/dev.ts` to account for the new pathing of `package.json`.
1 parent 2afad8b commit d76737b

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

develop.sh

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ function create_initial_user() {
1414
# TODO: We need to wait for `coderd` to spin up -
1515
# need to replace with a deterministic strategy
1616
sleep 5s
17-
17+
1818
curl -X POST \
19-
-d "{\"email\": \"$EMAIL\", \"username\": \"$USERNAME\", \"organization\": \"$ORGANIZATION\", \"password\": \"$PASSWORD\"}" \
20-
-H 'Content-Type:application/json' \
21-
http://localhost:3000/api/v2/user
19+
-d "{\"email\": \"$EMAIL\", \"username\": \"$USERNAME\", \"organization\": \"$ORGANIZATION\", \"password\": \"$PASSWORD\"}" \
20+
-H 'Content-Type:application/json' \
21+
http://localhost:3000/api/v2/user
2222
}
2323

2424
# Do initial build - a dev build for coderd.
@@ -29,4 +29,9 @@ make bin/coderd
2929
# This is a way to run multiple processes in parallel, and have Ctrl-C work correctly
3030
# to kill both at the same time. For more details, see:
3131
# https://stackoverflow.com/questions/3004811/how-do-you-run-multiple-programs-in-parallel-from-a-bash-script
32-
(trap 'kill 0' SIGINT; create_initial_user & CODERV2_HOST=http://127.0.0.1:3000 yarn dev & ./bin/coderd)
32+
(
33+
trap 'kill 0' SIGINT
34+
create_initial_user &
35+
CODERV2_HOST=http://127.0.0.1:3000 yarn --cwd=./site dev &
36+
./bin/coderd
37+
)

site/dev.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ if (process.env.CODERV2_HOST) {
1717

1818
console.log(`Using CODERV2_HOST: ${coderV2Host}`)
1919

20-
const app = next({ dev, dir: "./site" })
20+
const app = next({ dev, dir: "." })
2121
const handle = app.getRequestHandler()
2222

2323
app

0 commit comments

Comments
 (0)