Skip to content

Commit

Permalink
chore(docs): adjust grammar
Browse files Browse the repository at this point in the history
  • Loading branch information
jlenon7 committed Jan 10, 2024
1 parent e2873ec commit 6b6c1b5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
16 changes: 8 additions & 8 deletions docs/getting-started/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ since any sensitive credentials would get exposed.
### Determining the current environment

Before loading your application's environment variables,
Athenna determines if either the `NODE_ENV` environment
Athenna determines if either the `APP_ENV` environment
variable has been externally provided or if the `--env` Artisan
flag has been specified. If so, Athenna will attempt to load
the `.env.${NODE_ENV}` file if it exists. If it does not exist,
Athenna will try to find the `NODE_ENV` value inside the `.env` file,
the `.env.${APP_ENV}` file if it exists. If it does not exist,
Athenna will try to find the `APP_ENV` value inside the `.env` file,
if it exists, Athenna will save its value and repeat the process
above. Finally, if the `NODE_ENV` is not present in the file,
above. Finally, if the `APP_ENV` is not present in the file,
Athenna will load the `.env` file by default if it exists.

Running providing `--env` flag in Artisan:
Expand All @@ -83,10 +83,10 @@ Running providing `--env` flag in Artisan:
node artisan serve --env=local
```

Running providing `NODE_ENV` externally:
Running providing `APP_ENV` externally:

```bash
NODE_ENV=local node artisan serve
APP_ENV=local node artisan serve
```

Let's check some practical examples. This is the default
Expand All @@ -95,9 +95,9 @@ Let's check some practical examples. This is the default
```dotenv
HOST=localhost
PORT=3000
NODE_ENV=local
APP_NAME=Athenna
APP_ENV=local
APP_DEBUG=true
APP_URL=http://${HOST}:${PORT}
APP_DOMAIN=${HOST}
Expand All @@ -109,7 +109,7 @@ LOG_CHANNEL=application
```

In the `.env` file above, you can see that we have the
`NODE_ENV=local`. This means that if you create a new
`APP_ENV=local`. This means that if you create a new
`.env.local` file in your project root path, Athenna
will load it instead of `.env` if running your application
without a predefined environment.
Expand Down
4 changes: 2 additions & 2 deletions docs/testing/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ to `test`, meaning that the `.env.test` file will be used when
running your tests.

You are free to define other testing environment value. To do
that you can use the `setNodeEnv()` method of `Runner` class
that you can use the `setAppEnv()` method of `Runner` class
in your `Path.bootstrap('test.ts')` file:

```typescript
Expand All @@ -60,7 +60,7 @@ await Runner.setTsEnv()
.addAssertPlugin()
.addPlugin(request())
.addPlugin(command())
.setNodeEnv('testing') 👈
.setAppEnv('testing') 👈
.addPath('tests/e2e/**/*.ts')
.addPath('tests/unit/**/*.ts')
.setCliArgs(process.argv.slice(2))
Expand Down
2 changes: 2 additions & 0 deletions docs/the-basics/helpers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ import { Exception } from '@athenna/common'

const exception = new Exception({
status: 500,
details: [],
name: 'ErrorName',
code: 'ERROR_CODE',
message: 'Some exception has ocurred.',
Expand All @@ -249,6 +250,7 @@ import { Exception } from '@athenna/common'

const exception = new Exception({
status: 500,
details: []
name: 'ErrorName',
code: 'ERROR_CODE',
message: 'Some exception has ocurred.',
Expand Down

0 comments on commit 6b6c1b5

Please sign in to comment.