> For the complete documentation index, see [llms.txt](https://docs.elentra.org/ejs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.elentra.org/ejs/developers/setup/serving-ejs-dev-mode.md). Agents can also search and read this documentation through its [MCP server](https://docs.elentra.org/ejs/~gitbook/mcp).

# Serve Dev Mode

### 1. Compile and Serve EJS2

After all dependencies have been installed by running the `yarn` command, you will be able to serve the application in developer mode. To do this, simply run the following command in terminal, from the `elentra-2x-js` directory:

```
yarn serve
```

Some text will appear in the terminal as the serve process initializes, along with a percentage progress indicator. Once the process finishes you should see something similar to the following:

![Terminal Screen: Successful Compilation](https://2206938072-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LGVi1RzHCYM8uQFzOVx%2F-LnXyAMJ1mVlu72mD0SS%2F-LnXzW6EKWI2f04SQjzZ%2FScreen%20Shot%202019-08-30%20at%2010.44.45%20AM.png?alt=media\&token=da48ac58-36b4-4751-aff8-46bc6e447b4b)

### 2. Modify Elentra Developer .env

Navigate to `~/Documents/elentra-developer` and edit the  `.env` file

```
DEV_MODE=true
FRONT_END_DOMAIN=http://elentra-1x-me.localhost:8081 # This should match the Local URL displayed by yarn serve (see above screenshot)
```

### 3. Restart the Docker Container

```
docker-compose down
docker-compose up -d --build
```

### 4. Confirm EJS2 is Up and Running

Elentra JS is now being served in development mode. In ME 1.16 or higher, you can confirm by visiting  <http://elentra-1x-me.localhost/sandbox>. The updated Sandbox module allows you to perform CRUD operations for a series of Cards, all making use of Elentra JS 2.0.

![Sandbox EJS2 Module. ](https://2206938072-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LGVi1RzHCYM8uQFzOVx%2F-MGObeU1ycCtJgj3ucro%2F-MGObi_eDaNr3LoVSEn6%2Fimage.png?alt=media\&token=15dc47c1-e1a5-4469-99d1-4548b0cba3db)

{% hint style="info" %}
Any saved edits made within files located in the **Elentra JS Design System** (or any of the EJS modules) while the app is served in development mode will now cause an automatic recompilation of the files, enabling hot-reloading.
{% endhint %}

You can exit development mode by cancelling the actively running operation from terminal. On macOS, the shortcut for this in most shells is `Ctrl-C`.

{% hint style="warning" %}
You will need to run the `yarn serve` command from within `~/Sites/elentra-2x-js` directory moving forward, anytime you need to:

1. Run EJS2 Modules locally (Sandbox, Notices Management)
2. Make changes to any EJS2 modules
3. Create new EJS2 Modules

Compiling VueJS/Typescript code to plain JavaScript is a standard procedure in the development process.
{% endhint %}
