mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
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:
+10
-5
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user