Error following the 60 minute Quickstart tutorial

I’m following the 60 minute Quickstart tutorial: My First ColdBox Application | ColdBox HMVC Documentation

I created the “60-minute-quickstart” folder, run “install coldbox” and “coldbox create app Quickstart”, and then when I run “server start” I get:

ERROR (5.6.1+00618)

The [.env] file is missing keys from the .env.example. You can populate your .env with the new settings using dotenv populate --new

Missing keys: [ DB_DATABASE, APPNAME, ENVIRONMENT, JWT_SECRET, DB_HOST, DB_USER, DB_PASSWORD, DB_PORT, S3_ACCESS_KEY, S3_DOMAIN, S3_REGION, DB_CONNECTIONSTRING, S3_SECRET_KEY, DB_DRIVER, DB_CLASS ]

I’m new to this and don’t know what to do here.
I installed the latest commandbox version (64 bit, Windows).
I’m using Windows 10.

The error message is pretty self-explanatory. It’s not a bug, it’s a scenario where your setup isn’t complete and the dotenv module won’t let you start the server until you fix it.

Basically, we store secrets in an .env file which is not committed to source control. So we also commit an .env.example file which has all the keys but no values. This is so a new developer can see what secrets they need to define for the app to run. When a server starts, the dotenv module looks to see if you have keys in your .env.example file which are not present in you .env file and alerts you.

The error message gives you the solution right there. Just run

dotenv populate --new

and it will add the missing keys. You can just hit enter on all the options to accept the default.

1 Like

thx! I wasn’t sure about the “dotenv populate --new” as I thought I might need to setup things there. But just hitting enter did the trick :slight_smile: