Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 38 additions & 4 deletions apps/docs/content/1.getting-started/2.installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ evlog supports multiple environments: Nuxt, Nitro, and standalone TypeScript.

## Nuxt

Add evlog as a Nuxt module:
Install evlog via your preferred package manager:

::code-group
```bash [pnpm]
Expand All @@ -24,7 +24,7 @@ bun add evlog
```
::

Then add it to your Nuxt config:
Then add it to your Nuxt config using the `evlog/nuxt` module:

```typescript [nuxt.config.ts]
export default defineNuxtConfig({
Expand Down Expand Up @@ -163,7 +163,24 @@ That's it! You can now use `useLogger(event)` in any API route.

## Nitro

For standalone Nitro projects (without Nuxt), add evlog as a plugin:
Install evlog via your preferred package manager:

::code-group
```bash [pnpm]
pnpm add evlog
```
```bash [npm]
npm install evlog
```
```bash [yarn]
yarn add evlog
```
```bash [bun]
bun add evlog
```
::

Then, add evlog as a Nitro plugin (without Nuxt) using the `evlog/nitro` plugin:

```typescript [nitro.config.ts]
export default defineNitroConfig({
Expand All @@ -173,7 +190,24 @@ export default defineNitroConfig({

## Standalone TypeScript

For scripts, workers, CLI tools, or any TypeScript project:
Install evlog via your preferred package manager:

::code-group
```bash [pnpm]
pnpm add evlog
```
```bash [npm]
npm install evlog
```
```bash [yarn]
yarn add evlog
```
```bash [bun]
bun add evlog
```
::

Then, use it as any other TypeScript library within your scripts, CLI tools, workers, or apps:

```typescript [scripts/sync-job.ts]
import { initLogger, createRequestLogger } from 'evlog'
Expand Down
Loading