---
lang: en
title: 'API docs: core.application.state'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/core
permalink: /doc/en/lb4/apidocs.core.application.state.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/core](./core.md) &gt; [Application](./core.application.md) &gt; [state](./core.application.state.md)

## Application.state property

Get the state of the application. The initial state is `created` and it can transition as follows by `start` and `stop`<!-- -->:

1. start - !started -<!-- -->&gt; starting -<!-- -->&gt; started - started -<!-- -->&gt; started (no-op) 2. stop - (started \| initialized) -<!-- -->&gt; stopping -<!-- -->&gt; stopped - ! (started \|\| initialized) -<!-- -->&gt; stopped (no-op)

Two types of states are expected: - stable, such as `started` and `stopped` - in process, such as `booting` and `starting`

Operations such as `start` and `stop` can only be called at a stable state. The logic should immediately set the state to a new one indicating work in process, such as `starting` and `stopping`<!-- -->.

<b>Signature:</b>

```typescript
get state(): string;
```

