Creating a scratch Org

A scratch Org is the Org where developers will build source code and configure an application. To create a scratch Org from the command line, you can execute the following command (cd into the project before running this command):

sfdx force:org:create -f project-scratch-def.json -a LighntningScratchOrg

Note that, here, LightningScratchOrg is the alias of the Org. Also, note that we have to be in the path of the config file. The following screenshot depicts what is shown following the successful creation of a scratch Org:

Notice from the screenshot that a username is automatically assigned and an OrgId is also generated. ...

Get Learning Salesforce Lightning Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.