docs
overview
v3.0

v3.0

TIP

To migrate to v3, please refer to the migration guide.

zely@3 has had its code rewritten to make the server faster and more workable.

The usage of zely@2 and zely@3 is very different.

To use zely@3, it is recommended to use @zely-js/zely instead of zely. (if not using cli)
If you use cli, install zely.

The zely package is a re-export of @zely-js/zely and zely-cli. Whether you import zely or @zely-js/zely, the result is the same.

INFO

To use v2, you can install @2 with the following command.

Terminal
npm i --save-dev zely@2

And also you can see v2 documentation

#Installation

  1. Install packages
Terminal
npm i --save-dev @zely-js/zely zely-cli
Terminal
npm i --save-dev @zely-js/zely zely-cli
  1. edit package.json
package.json
{
  "scripts": {
    "dev": "zely-cli dev"
  }
}

#Changes

Server

For optimization purposes, we improved performance by building only the files that are loaded instead of building all files when starting the server.

#To be added

  1. static props
  2. zely/build
  3. @zely/builder

#Deprecated

Features that are not needed or reduce performance have been deleted.

Core

  1. snatcher

CLI

  1. add

WARNING

@zely/plugin-cors is no longer updated. (It may not work in the future)

Instead, add cors manually to the middleware.

Typescript
export default defineConfig({
  middlewares: [
    require('cors')({
      /*options*/
    }),
  ],
});
  1. analyze