diff --git a/backend/README.md b/backend/README.md index 9eeeb64..2b1f97a 100644 --- a/backend/README.md +++ b/backend/README.md @@ -8,7 +8,7 @@ and initialize it with the `sql/init.sql` script: $ cat sql/init.sql | sqlite3 users.db ``` -You also need to create a `.env` file with the following variables: +You need to create a `.env` file with the following variables: - `JWT_SECRET`: Required. A cryptographically secure string used to encode tokens. diff --git a/backend/user.go b/backend/user.go index 2a63882..95f1ef4 100644 --- a/backend/user.go +++ b/backend/user.go @@ -55,7 +55,7 @@ func NewUserHandler() (*UserHandler, error) { jwt_secret_str := os.Getenv("JWT_SECRET") // Return any errors if jwt_secret_str == "" { - return nil, err + return nil, errors.New("no JWT_SECRET provided in .env") } jwt_secret := []byte(jwt_secret_str)