Skip to content

Commit

Permalink
Merge pull request #1521 from GSA/notify-admin-1518
Browse files Browse the repository at this point in the history
explain how to create a first user in the db
  • Loading branch information
ccostino authored May 10, 2024
2 parents 8dd9cf3 + b79835d commit b6b0909
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,30 @@ This will run the local development web server and make the admin site
available at http://localhost:6012; remember to make sure that the Notify.gov
API is running as well!

## Creating a 'First User' in the database

After you have completed all setup steps, you will be unable to log in, because there
will not be a user in the database to link to the login.gov account you are using. So
you will need to create that user in your database using the 'create-test-user' command.

Open two terminals pointing to the api project and then run these commands in the
respective terminals.

(Server 1)
env ALLOW_EXPIRED_API_TOKEN=1 make run-flask

(Server 2)
poetry run flask command create-admin-jwt | tail -n 1 | pbcopy
poetry run flask command create-test-user --admin=True;

Supply your name, email address, mobile number, and password when prompted. Make sure the email address
is the same one you are using in login.gov and make sure your phone number is in the format 5555555555.

If for any reason in the course of development it is necessary for your to delete your db
via the `dropdb` command, you will need to repeat these steps when you recreate your db.



## Git Hooks

We're using [`pre-commit`](https://pre-commit.com/) to manage hooks in order to
Expand Down

0 comments on commit b6b0909

Please sign in to comment.