Creating .env file in Windows

Windows do not allow you to create a .env file directly from the windows explorer since it will not allow file names starting with a dot. However, you will be able to create it from VSCode easily. First, open the project folder in VSCode using the menu option File | Open Folder...[Ctrl+K Ctrl+O] as shown in the following screenshot:

Once you have opened the folder, click on the Explorer icon on the top left corner of the VSCode (or press Ctrl+Shift+E) to open the explorer panel. In the explorer panel, click on the New File button as shown in the following screenshot:

Then simply type in the new file name .env ...

Get JavaScript by Example 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.