>('api.elysiajs.com')const{ data }=await api . profile . patch ({ age :21}) For Frontend End-to-end Type Safety Like tRPC, Elysia provides type-safety from the backend to the frontend without code generation. The interaction between frontend and backend is type-checked at compile time...
import { Elysia, t } from 'elysiajs';import { Cache } from '@elysiajs/cache';const app = new Elysia();// 初始化缓存实例const cache = new Cache({ ttl: 60 * 60 }); // 缓存有效期设为1小时app.get('/data', async ({ query }) => { const key = JSON.stringify(query); let d...
基于elysiajs开发的一款基本的RMS系统 展开 收起 elysia prisma MySQL rms 暂无标签 TypeScript 等2 种语言 TypeScript 98.5% Dockerfile 1.5% MIT 使用MIT 开源许可协议 保存更改 取消 发行版 暂无发行版 贡献者 (1) 全部 近期动态 3个月前创建了任务 #IB9FDE 项目不错,但是你还在...
ElysiaJS 是一个由 Bun 增强的 Type 框架,具有端到端的类型安全、统一的类型系统和出色的开发人员体验。当前 Github star 数 7.7k。 ElysiaJS 在2024年03月16日,发布了 1.0 版本。Elysia 1.0 是开发 1.8 年后的第一个稳定版本,该版本引入了重大改进,并包含一个必要的突破性改动。 ElysiaJS 主要特性 1)超强...
Hono是由Yusuke Wada创建的。他于 2021 年启动了该项目,因为当时没有适合Cloudflare Workers的好 Node.js 框架,这让他感到不满。从那时起,Hono 逐步增加了对 Node.js、Bun 和 Deno 等运行时的支持。 // 导入Hono库 import { Hono } from 'hono' ...
elysiajs/elysia elysiajs/elysiaPublic Sponsor NotificationsYou must be signed in to change notification settings Fork257 Star11.6k Code Issues238 Discussions Actions Projects Insights main 18Branches62Tags Code Folders and files Name Last commit message...
import{Elysia}from'elysia'import{staticPlugin}from'@elysiajs/static'constapp=newElysia().use(staticPlugin()).listen(8080) Config Below is an available config for a static plugin. assets @default "public" Asset path to expose as a public path ...
import{ Elysia, t }from'elysia'constapp=newElysia().ws('/ws', {// validate incoming messagebody: t.Object({message: t.String()}),query: t.Object({id: t.String()}),message(ws, {message}) {// Get schema from `ws.data`const{id}=ws.data.queryws.send({id,message,time: Date....
With SvelteKit, you can run Elysia on server routes. Create src/routes/[...slugs]/+server.ts. In +server.ts, create or import an existing Elysia server Export the handler with the name of method you want to exposetypescript// src/routes/[...slugs]/+server.ts import...
import{Elysia,t}from'elysia'import{swagger}from'@elysiajs/swagger'constapp=newElysia().use(swagger()).get('/',()=>'hi',{response:t.String({description:'sample description'})}).post('/json/:id',({body,params:{id},query:{name}})=>({...body,id,name}),{params:t.Object({id:t...