# Using Ray with Express.js

[Express.js](https://expressjs.com/) is a fast, unopinionated, minimalist web framework for Node.js. Use Ray to help you debug when developing Express.js applications and middleware.

[permafrost-dev/express-ray](https://github.com/permafrost-dev/express-ray)

## Installing the package

```
npm install express-ray
```

```
yarn add express-ray
```

## Installing the plugin

To install the `express-ray` plugin into your Express.js application, call the `install` method provided by the `plugin` import:

```
import express from 'express';
import { plugin as expressRayPlugin } from 'express-ray';

const app = express();

expressRayPlugin.install(app);
```

Once installed, you can use `ray()` from anywhere in your Express.js application:

```
app.get('/', (req, res) => {
    ray('Request received!');
    ray(req.query);

res.send('Hello World!');
});
```

## Usage

All [JavaScript methods](/content/docs/javascript/vanilla-javascript/usage/index.html) are available when using Express.js.

> ## What's next?
>
> Now that Ray is installed in your Express.js project, see what you can use it for.
>
> - [Learn how to use Ray with JavaScript](/content/docs/javascript/vanilla-javascript/usage/index.html)
> - [View all available methods](/content/docs/javascript/vanilla-javascript/reference/index.html)

## Debug without breaking your flow

Ray keeps all your debug output neatly organized in a dedicated desktop app.

Download Ray

[Buy Ray for\
434 NOK](https://spatie.be/products/ray)

Licenses are valid for 1 year and managed through [Spatie](https://spatie.be/products/ray). Licenses purchased before Ray 3 remain valid. VAT is calculated at checkout.

## Thanks for trying out Ray!

macOS

[ARM](https://spatie.be/products/ray/v3/download/macos-arm64/latest) [Intel](https://spatie.be/products/ray/v3/download/macos-x64/latest)

Windows

[x86 (Intel)](https://spatie.be/products/ray/v3/download/windows/latest)

Linux

[AppImage](https://spatie.be/products/ray/v3/download/linux/latest)

By downloading Ray, you agree to our [terms of use](/content/terms-of-use/index.html).

The free trial lets you send up to 20 messages per session.
