Docs
Migration
Migration from 3.x

Migration from 3.x

4.0 is 100% compatible with 3.0!

Just edit a few things for magic.

#ctx.send

Typescript
export default "Hello World!"; // or
export default [ALL("Hello World!")];

A method to improve readability has been added.

Now, instead of ctx.send, just enter the value you want to send.

#HTML

No more ctx.html like this:

Typescript
export default [ALL((ctx) => ctx.html('<h1>Hello World!</h1>'))];

Just enable experimental.useHTML,

Typescript
import { defineConfig } from 'zely';
 
export default defineConfig({
  experimental: {
    useHTML: true,
  },
});

WARNING

This useHTML is an experimental feature.

and write .html file.

HTML
<h1>Hello World!</h1>

State

You can also create cool counters that are not possible in plain HTML, as shown below:

HTML