<commit_before>---
title: Version 2.2 release notes
author: <NAME>
author_title: Fullstack developper and creator of Foal TS
author_url: https://github.com/LoicPoullain
author_image_url: https://avatars1.githubusercontent.com/u/13604533?v=4
tags: [release]
---

![Banner](./assets/version-2.2-is-here/banner.png)

Version 2.2 has been released! Here are the improvements that it brings.

<!--truncate-->

## New Look of the `createapp` Command

The output of the `createapp` command has been prettified to be more "welcoming".

![New createapp look](./assets/version-2.2-is-here/new-create-app.png)<commit_msg>[Blog] Add support for subdir in "g rest-api"<commit_after>---
title: Version 2.2 release notes
author: <NAME>
author_title: Fullstack developper and creator of Foal TS
author_url: https://github.com/LoicPoullain
author_image_url: https://avatars1.githubusercontent.com/u/13604533?v=4
tags: [release]
---

![Banner](./assets/version-2.2-is-here/banner.png)

Version 2.2 has been released! Here are the improvements that it brings.

<!--truncate-->

## New Look of the `createapp` Command

The output of the `createapp` command has been prettified to be more "welcoming".

![New createapp look](./assets/version-2.2-is-here/new-create-app.png)

## Support of nested routes in `foal generate|g rest-api <name>`

Like the command `g controller`, `g rest-api` now supports nested routes.

Let's say we have the following file structure:

```
src/
 '- app/
  |- controllers/
  | |- api.controller.ts
  | '- index.ts
  '- entities/
    |- user.entity.ts
    '- index.ts
```

Running these commands will add and register the following files:

```
foal generate rest-api api/product --auth --register
foal generate rest-api api/order --auth --register
```

```
src/
 '- app/
  |- controllers/
  | |- api/
  | | |- product.controller.ts
  | | |- order.controller.ts
  | | '- index.ts
  | |- api.controller.ts
  | '- index.ts
  '- entities/
    |- product.entity.ts
    |- order.entity.ts
    |- user.entity.ts
    '- index.ts
```
{'fraction_non_alphanumeric': 0.1477832512315271, 'fraction_numerical': 0.017733990147783252, 'mean_word_length': 3.4248366013071894, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1075596', 'n_tokens_mistral': 719, 'n_tokens_neox': 685, 'n_words': 194}