Version 2.5 of Foal has been released! Here are the improvements that it brings.

"npm run develop" watches config files

In previous versions of Foal, the develop command did not restart the server when a configuration file was changed. This was annoying and is the reason why, starting with v2.5, new projects generated by the CLI will watch configuration files.

"createOpenApiDocument" accepts an optional serviceManager

If you use createOpenApiDocument, in a shell script for example, the function accepts an optional serviceManager parameter from this version.

This can be useful if your OpenAPI decorators access controller properties whose values are manually injected.

You can find the complete release notes of this version here:

Version 2.3 of Foal has been released! On the agenda: Prisma documentation, GraphiQL, .env.local files and authentication improvements.

In a few words, Foal is a Node.JS framework for building web applications with:
- an elegant and straightforward code (no over-engineering),
- many features out-of-the-box (validation, CLI, ORM, Swagger generation, stateful and stateless for both SPA and SSR, AWS S3 integration, etc),
- and the support of TypeScript.

You can find the release notes of this version here:

This article presents the improvements to the session system in FoalTS version 2.

The new syntax can be used either with cookies or with the Authorization header. It adds the following new features:

  • query all sessions of a given user
  • query all connected users
  • force logout of a specific user
  • flash sessions
  • session ID regeneration
  • anonymous and authenticated sessions

FoalTS also simplifies stateful CSRF protection so that all it takes is one setting to enable it.

Link to the article:

In this tutorial you will learn how to create a basic web application with FoalTS. The demo application is a simple to-do list with which users can view, create and delete their tasks.

1. Installation
2. Introduction
3. The Todo Model
4. The Shell Script create-todo
6. Validation and Sanitization

How to create simple to-do list

Text version:​
Source code:​
Discord channel:

Loïc Poullain

Fullstack Developer JS/TS. Creator of FoalTS.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store