Create a project in VSCode
- Open up your Visual Studio Code (Link of previous setup blog). Make sure you have installed VSCode, Salesforce CLI, and Salesforce Extension Pack.
You can either use the hotkeys Ctrl+Shift+P to open the command palette in Windows and Cmd+Shift+P for mac, or on the left side of the screen, click on gear like icon select Command Palette.
A selectable dropdown will open up. Select Create Project to Manifest, as shown below screenshot.
Select Standard Project template.
Enter the project name here. I have given Learn LWC.
It will open up the File Explorer, asking you to save the above-created project in your machine, specify the location; here, I have created a folder named vsCode in the Local Disk.
Once you have selected the location to save, click on Create Project.
Connect and Authorize Salesforce Org
You can authorize any org, be it dev, sandbox, or production; here, I have used my dev org, a production environment for me. On the left lower side, you’ll see an option to connect default org click on that, and a command palette will open up select Authorize an org.
Now another set of options will populate select Production. You can select Sandbox or any custom URL for your environment. Since I have connected dev org, so it is a production environment for me.
Enter the name for default org here; I have given practiceOrg and press Enter.
After this, you will be redirected to the login.salesforce.com, enter the credentials for your org, and login.