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`.
This commit is contained in:
Bryan
2022-02-01 18:02:59 -08:00
committed by GitHub
parent 2afad8b3b6
commit d76737b30b
2 changed files with 11 additions and 6 deletions
+10 -5
View File
@@ -14,11 +14,11 @@ function create_initial_user() {
# TODO: We need to wait for `coderd` to spin up -
# need to replace with a deterministic strategy
sleep 5s
curl -X POST \
-d "{\"email\": \"$EMAIL\", \"username\": \"$USERNAME\", \"organization\": \"$ORGANIZATION\", \"password\": \"$PASSWORD\"}" \
-H 'Content-Type:application/json' \
http://localhost:3000/api/v2/user
-d "{\"email\": \"$EMAIL\", \"username\": \"$USERNAME\", \"organization\": \"$ORGANIZATION\", \"password\": \"$PASSWORD\"}" \
-H 'Content-Type:application/json' \
http://localhost:3000/api/v2/user
}
# Do initial build - a dev build for coderd.
@@ -29,4 +29,9 @@ make bin/coderd
# This is a way to run multiple processes in parallel, and have Ctrl-C work correctly
# to kill both at the same time. For more details, see:
# https://stackoverflow.com/questions/3004811/how-do-you-run-multiple-programs-in-parallel-from-a-bash-script
(trap 'kill 0' SIGINT; create_initial_user & CODERV2_HOST=http://127.0.0.1:3000 yarn dev & ./bin/coderd)
(
trap 'kill 0' SIGINT
create_initial_user &
CODERV2_HOST=http://127.0.0.1:3000 yarn --cwd=./site dev &
./bin/coderd
)
+1 -1
View File
@@ -17,7 +17,7 @@ if (process.env.CODERV2_HOST) {
console.log(`Using CODERV2_HOST: ${coderV2Host}`)
const app = next({ dev, dir: "./site" })
const app = next({ dev, dir: "." })
const handle = app.getRequestHandler()
app