Getting started
Requirements
Section titled “Requirements”- Node.js 22 or newer
- A package manager: pnpm, npm or yarn all work
Install
Section titled “Install”pnpm add -g henri# ornpm install -g henriCreate a new project
Section titled “Create a new project”henri new <folder name>The command creates a directory structure similar to this:
├── app│ ├── controllers│ ├── helpers│ ├── models│ ├── workers│ └── views│ ├── assets│ ├── components│ ├── pages│ ├── public│ └── styles├── config│ ├── default.json│ ├── production.json│ ├── routes.js│ └── webpack.js <- extend the Next.js webpack settings├── test│ ├── controllers│ ├── helpers│ ├── models│ └── views└── package.jsonIf you have a Ruby on Rails background, this should look familiar.
Start coding
Section titled “Start coding”cd <folder name>henri serverhenri boots its modules in order (configuration, mail, GraphQL, controllers, server, models, views, users, routes, workers, tests), prints the URL it is listening on and watches your files. Saving a controller, a model, a route file, a worker or a configuration file reloads the affected modules without restarting the process.
While the server runs, the terminal accepts a few shortcuts:
| Key | Action |
|---|---|
R |
list the loaded routes |
U |
list the routes whose controller is missing |
Cmd/Ctrl+R |
reload the whole application |
Cmd/Ctrl+O |
open the app in your browser |
Cmd/Ctrl+C |
quit |
Useful flags
Section titled “Useful flags”henri server --production # same as NODE_ENV=productionhenri server --debug=henri:* # same as DEBUG=henri:*henri server --inspect # start the Node.js inspectorhenri server --skip-workers # do not start app/workershenri server --force-build # force a production rebuild of the viewsSee the CLI reference for every command.
