{"compiled":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nfunction _createMdxContent(props) {\n  const _components = {\n    a: \"a\",\n    code: \"code\",\n    figcaption: \"figcaption\",\n    figure: \"figure\",\n    h2: \"h2\",\n    hr: \"hr\",\n    li: \"li\",\n    ol: \"ol\",\n    p: \"p\",\n    pre: \"pre\",\n    span: \"span\",\n    ...props.components\n  }, {Box, TabItem, Tabs} = _components;\n  if (!Box) _missingMdxReference(\"Box\", true);\n  if (!TabItem) _missingMdxReference(\"TabItem\", true);\n  if (!Tabs) _missingMdxReference(\"Tabs\", true);\n  return _jsxs(_Fragment, {\n    children: [_jsx(Box, {\n      type: \"warning\",\n      children: _jsxs(_components.p, {\n        children: [\"✨ To start a new project, use \", _jsx(_components.a, {\n          href: \"https://github.com/zely-js/dobs\",\n          children: \"dobs\"\n        }), \", a\\nlightweight and stabilized version of zely.\"]\n      })\n    }), \"\\n\", _jsx(_components.p, {\n      children: \"In this chapter, we will introduce how to create your first zely app.\"\n    }), \"\\n\", _jsx(_components.h2, {\n      children: \"Using tool\"\n    }), \"\\n\", _jsxs(_components.p, {\n      children: [\"You can create zely application easily with \", _jsx(_components.a, {\n        href: \"https://npmjs.com/package/zely-cli\",\n        children: \"zely-cli\"\n      }), \".\"]\n    }), \"\\n\", _jsx(_components.hr, {}), \"\\n\", _jsxs(_components.ol, {\n      children: [\"\\n\", _jsxs(_components.li, {\n        children: [\"Download the template using the \", _jsx(_components.code, {\n          children: \"zely-cli\"\n        }), \" tool:\"]\n      }), \"\\n\"]\n    }), \"\\n\", _jsx(_components.figure, {\n      \"data-rehype-pretty-code-figure\": \"\",\n      children: _jsx(_components.pre, {\n        tabIndex: \"0\",\n        \"data-language\": \"bash\",\n        \"data-theme\": \"material-theme-palenight github-light\",\n        children: _jsx(_components.code, {\n          \"data-language\": \"bash\",\n          \"data-theme\": \"material-theme-palenight github-light\",\n          style: {\n            display: \"grid\"\n          },\n          children: _jsxs(_components.span, {\n            \"data-line\": \"\",\n            children: [_jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#FFCB6B\",\n                \"--shiki-light\": \"#6F42C1\"\n              },\n              children: \"npx\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#C3E88D\",\n                \"--shiki-light\": \"#032F62\"\n              },\n              children: \" zely-cli\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#C3E88D\",\n                \"--shiki-light\": \"#032F62\"\n              },\n              children: \" init\"\n            })]\n          })\n        })\n      })\n    }), \"\\n\", _jsxs(_components.ol, {\n      start: \"2\",\n      children: [\"\\n\", _jsx(_components.li, {\n        children: \"Install Dependencies:\"\n      }), \"\\n\"]\n    }), \"\\n\", _jsxs(Tabs, {\n      children: [_jsx(TabItem, {\n        id: \"yarn\",\n        children: _jsx(_components.figure, {\n          \"data-rehype-pretty-code-figure\": \"\",\n          children: _jsx(_components.pre, {\n            tabIndex: \"0\",\n            \"data-language\": \"bash\",\n            \"data-theme\": \"material-theme-palenight github-light\",\n            children: _jsx(_components.code, {\n              \"data-language\": \"bash\",\n              \"data-theme\": \"material-theme-palenight github-light\",\n              style: {\n                display: \"grid\"\n              },\n              children: _jsx(_components.span, {\n                \"data-line\": \"\",\n                children: _jsx(_components.span, {\n                  style: {\n                    \"--shiki-dark\": \"#FFCB6B\",\n                    \"--shiki-light\": \"#6F42C1\"\n                  },\n                  children: \"yarn\"\n                })\n              })\n            })\n          })\n        })\n      }), _jsx(TabItem, {\n        id: \"npm\",\n        children: _jsx(_components.figure, {\n          \"data-rehype-pretty-code-figure\": \"\",\n          children: _jsx(_components.pre, {\n            tabIndex: \"0\",\n            \"data-language\": \"bash\",\n            \"data-theme\": \"material-theme-palenight github-light\",\n            children: _jsx(_components.code, {\n              \"data-language\": \"bash\",\n              \"data-theme\": \"material-theme-palenight github-light\",\n              style: {\n                display: \"grid\"\n              },\n              children: _jsxs(_components.span, {\n                \"data-line\": \"\",\n                children: [_jsx(_components.span, {\n                  style: {\n                    \"--shiki-dark\": \"#FFCB6B\",\n                    \"--shiki-light\": \"#6F42C1\"\n                  },\n                  children: \"npm\"\n                }), _jsx(_components.span, {\n                  style: {\n                    \"--shiki-dark\": \"#C3E88D\",\n                    \"--shiki-light\": \"#032F62\"\n                  },\n                  children: \" install\"\n                })]\n              })\n            })\n          })\n        })\n      })]\n    }), \"\\n\", _jsxs(_components.ol, {\n      start: \"3\",\n      children: [\"\\n\", _jsx(_components.li, {\n        children: \"Run the app:\"\n      }), \"\\n\"]\n    }), \"\\n\", _jsxs(Tabs, {\n      children: [_jsx(TabItem, {\n        id: \"yarn\",\n        children: _jsx(_components.figure, {\n          \"data-rehype-pretty-code-figure\": \"\",\n          children: _jsx(_components.pre, {\n            tabIndex: \"0\",\n            \"data-language\": \"bash\",\n            \"data-theme\": \"material-theme-palenight github-light\",\n            children: _jsx(_components.code, {\n              \"data-language\": \"bash\",\n              \"data-theme\": \"material-theme-palenight github-light\",\n              style: {\n                display: \"grid\"\n              },\n              children: _jsxs(_components.span, {\n                \"data-line\": \"\",\n                children: [_jsx(_components.span, {\n                  style: {\n                    \"--shiki-dark\": \"#FFCB6B\",\n                    \"--shiki-light\": \"#6F42C1\"\n                  },\n                  children: \"yarn\"\n                }), _jsx(_components.span, {\n                  style: {\n                    \"--shiki-dark\": \"#C3E88D\",\n                    \"--shiki-light\": \"#032F62\"\n                  },\n                  children: \" dev\"\n                })]\n              })\n            })\n          })\n        })\n      }), _jsx(TabItem, {\n        id: \"npm\",\n        children: _jsx(_components.figure, {\n          \"data-rehype-pretty-code-figure\": \"\",\n          children: _jsx(_components.pre, {\n            tabIndex: \"0\",\n            \"data-language\": \"bash\",\n            \"data-theme\": \"material-theme-palenight github-light\",\n            children: _jsx(_components.code, {\n              \"data-language\": \"bash\",\n              \"data-theme\": \"material-theme-palenight github-light\",\n              style: {\n                display: \"grid\"\n              },\n              children: _jsxs(_components.span, {\n                \"data-line\": \"\",\n                children: [_jsx(_components.span, {\n                  style: {\n                    \"--shiki-dark\": \"#FFCB6B\",\n                    \"--shiki-light\": \"#6F42C1\"\n                  },\n                  children: \"npm\"\n                }), _jsx(_components.span, {\n                  style: {\n                    \"--shiki-dark\": \"#C3E88D\",\n                    \"--shiki-light\": \"#032F62\"\n                  },\n                  children: \" dev\"\n                })]\n              })\n            })\n          })\n        })\n      })]\n    }), \"\\n\", _jsx(_components.h2, {\n      children: \"Manual Installation\"\n    }), \"\\n\", _jsx(_components.p, {\n      children: \"You can also add zely to a project that already exists.\"\n    }), \"\\n\", _jsx(_components.p, {\n      children: \"Enter the command below:\"\n    }), \"\\n\", _jsxs(_components.figure, {\n      \"data-rehype-pretty-code-figure\": \"\",\n      children: [_jsx(_components.figcaption, {\n        \"data-rehype-pretty-code-title\": \"\",\n        \"data-language\": \"bash\",\n        \"data-theme\": \"material-theme-palenight github-light\",\n        children: \"npm\"\n      }), _jsx(_components.pre, {\n        tabIndex: \"0\",\n        \"data-language\": \"bash\",\n        \"data-theme\": \"material-theme-palenight github-light\",\n        children: _jsx(_components.code, {\n          \"data-language\": \"bash\",\n          \"data-theme\": \"material-theme-palenight github-light\",\n          style: {\n            display: \"grid\"\n          },\n          children: _jsxs(_components.span, {\n            \"data-line\": \"\",\n            children: [_jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#FFCB6B\",\n                \"--shiki-light\": \"#6F42C1\"\n              },\n              children: \"npm\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#C3E88D\",\n                \"--shiki-light\": \"#032F62\"\n              },\n              children: \" install\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#C3E88D\",\n                \"--shiki-light\": \"#005CC5\"\n              },\n              children: \" --save-dev\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#C3E88D\",\n                \"--shiki-light\": \"#032F62\"\n              },\n              children: \" zely\"\n            })]\n          })\n        })\n      })]\n    }), \"\\n\", _jsxs(_components.p, {\n      children: [\"Add the configuration file (\", _jsx(_components.code, {\n        children: \"zely.config.ts\"\n      }), \").\"]\n    }), \"\\n\", _jsxs(_components.figure, {\n      \"data-rehype-pretty-code-figure\": \"\",\n      children: [_jsx(_components.figcaption, {\n        \"data-rehype-pretty-code-title\": \"\",\n        \"data-language\": \"ts\",\n        \"data-theme\": \"material-theme-palenight github-light\",\n        children: \"zely.config.ts\"\n      }), _jsx(_components.pre, {\n        tabIndex: \"0\",\n        \"data-language\": \"ts\",\n        \"data-theme\": \"material-theme-palenight github-light\",\n        children: _jsxs(_components.code, {\n          \"data-language\": \"ts\",\n          \"data-theme\": \"material-theme-palenight github-light\",\n          style: {\n            display: \"grid\"\n          },\n          children: [_jsxs(_components.span, {\n            \"data-line\": \"\",\n            children: [_jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#89DDFF\",\n                \"--shiki-dark-font-style\": \"italic\",\n                \"--shiki-light\": \"#D73A49\",\n                \"--shiki-light-font-style\": \"inherit\"\n              },\n              children: \"import\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#89DDFF\",\n                \"--shiki-light\": \"#24292E\"\n              },\n              children: \" {\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#BABED8\",\n                \"--shiki-light\": \"#24292E\"\n              },\n              children: \" defineConfig\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#89DDFF\",\n                \"--shiki-light\": \"#24292E\"\n              },\n              children: \" }\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#89DDFF\",\n                \"--shiki-dark-font-style\": \"italic\",\n                \"--shiki-light\": \"#D73A49\",\n                \"--shiki-light-font-style\": \"inherit\"\n              },\n              children: \" from\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#89DDFF\",\n                \"--shiki-light\": \"#032F62\"\n              },\n              children: \" \\\"\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#C3E88D\",\n                \"--shiki-light\": \"#032F62\"\n              },\n              children: \"zely\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#89DDFF\",\n                \"--shiki-light\": \"#032F62\"\n              },\n              children: \"\\\"\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#89DDFF\",\n                \"--shiki-light\": \"#24292E\"\n              },\n              children: \";\"\n            })]\n          }), \"\\n\", _jsx(_components.span, {\n            \"data-line\": \"\",\n            children: \" \"\n          }), \"\\n\", _jsxs(_components.span, {\n            \"data-line\": \"\",\n            children: [_jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#89DDFF\",\n                \"--shiki-dark-font-style\": \"italic\",\n                \"--shiki-light\": \"#D73A49\",\n                \"--shiki-light-font-style\": \"inherit\"\n              },\n              children: \"export\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#89DDFF\",\n                \"--shiki-dark-font-style\": \"italic\",\n                \"--shiki-light\": \"#D73A49\",\n                \"--shiki-light-font-style\": \"inherit\"\n              },\n              children: \" default\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#82AAFF\",\n                \"--shiki-light\": \"#6F42C1\"\n              },\n              children: \" defineConfig\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#BABED8\",\n                \"--shiki-light\": \"#24292E\"\n              },\n              children: \"(\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#89DDFF\",\n                \"--shiki-light\": \"#24292E\"\n              },\n              children: \"{\"\n            })]\n          }), \"\\n\", _jsx(_components.span, {\n            \"data-line\": \"\",\n            children: _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#676E95\",\n                \"--shiki-dark-font-style\": \"italic\",\n                \"--shiki-light\": \"#6A737D\",\n                \"--shiki-light-font-style\": \"inherit\"\n              },\n              children: \"  // options\"\n            })\n          }), \"\\n\", _jsxs(_components.span, {\n            \"data-line\": \"\",\n            children: [_jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#89DDFF\",\n                \"--shiki-light\": \"#24292E\"\n              },\n              children: \"}\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#BABED8\",\n                \"--shiki-light\": \"#24292E\"\n              },\n              children: \")\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#89DDFF\",\n                \"--shiki-light\": \"#24292E\"\n              },\n              children: \";\"\n            })]\n          })]\n        })\n      })]\n    })]\n  });\n}\nfunction MDXContent(props = {}) {\n  const {wrapper: MDXLayout} = props.components || ({});\n  return MDXLayout ? _jsx(MDXLayout, {\n    ...props,\n    children: _jsx(_createMdxContent, {\n      ...props\n    })\n  }) : _createMdxContent(props);\n}\nreturn {\n  default: MDXContent\n};\nfunction _missingMdxReference(id, component) {\n  throw new Error(\"Expected \" + (component ? \"component\" : \"object\") + \" `\" + id + \"` to be defined: you likely forgot to import, pass, or provide it.\");\n}\n","posts":[{"overview":"Overview"},{"why-zely":"Why Zely"},{"getting-started":"Getting Started"},{"config":"Config References"},{"benchmark":"Performance"},{"troubleshooting":"Troubleshooting"},{"migration-to-dobs":"Migration to dobs"},{"routing":"Routing"},{"handler":"Handler"},{"methods":"Methods"},{"send-data":"Sending Data"},{"context":"Context"},{"page-data":"Page Data"},{"customizing-response":"Customizing Response"},{"data-fetching":"Data Fetching"},{"middleware":"Middleware"},{"auto":"Auto Importing"},{"provided-middlewares":"Provided Middlewares"},{"caching":"Caching"},{"store":"Data Caching"},{"cache":"Data Access"},{"serpack":"Serpack"},{"asset":"Asset"},{"debugging":"Debugging"},{"server-data":"Server Data"},{"frontend":"Frontend"},{"html":"HTML"},{"migration":"Migration"},{"migration-3x":"Migration from 3.x"},{"migration-2x":"Migration from 2.x"},{"community":"Community"},{"contributing":"Contributing"},{"playground":"Playground"}],"target":{"getting-started":"Getting Started"},"targetcategory":"Overview","directory":"docs"}