Skip to content

Commit d2379ef

Browse files
committed
refactor: Helper script to add a user
1 parent 69d88b4 commit d2379ef

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

scripts/create_initial_user.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
5+
EMAIL="${EMAIL:-admin@coder.com}"
6+
USERNAME="${USERNAME:-admin}"
7+
ORGANIZATION="${ORGANIZATION:-default}"
8+
PASSWORD="${PASSWORD:-p@ssword1}"
9+
10+
curl -X POST \
11+
-d "{\"email\": \"$EMAIL\", \"username\": \"$USERNAME\", \"organization\": \"$ORGANIZATION\", \"password\": \"$PASSWORD\"}" \
12+
-H 'Content-Type:application/json' \
13+
http://localhost:3000/api/v2/users

0 commit comments

Comments
 (0)