From 004ff00ff739ee1e8b903664bad349dcf07c6132 Mon Sep 17 00:00:00 2001 From: Dave Carlson Date: Sun, 5 Apr 2020 00:39:08 -0400 Subject: [PATCH] Add instruction to rename env.example file On creation of the project, a file called "env.example" is added. In order properly run environment variables locally, this file must be renamed ".env". --- _chapters/add-a-create-note-api.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/_chapters/add-a-create-note-api.md b/_chapters/add-a-create-note-api.md index 8a962fd60..cd8fa6707 100644 --- a/_chapters/add-a-create-note-api.md +++ b/_chapters/add-a-create-note-api.md @@ -175,6 +175,8 @@ $ mkdir mocks You might have noticed that the `body` and `requestContext` fields are the ones we used in our create function. In this case the `cognitoIdentityId` field is just a string we are going to use as our `userId`. We can use any string here; just make sure to use the same one when we test our other functions. +In the project root, rename `env.example` to `.env`. This allows your local machine to properly use the environment variables. If you do not update this file name, invoking the command below will result in a `Serverless: DOTENV: Could not find .env file.` error. + And to invoke our function we run the following in the root directory. ``` bash