+ adding hono and @hono/node-server

+ reemplazar index por server.ts
+ implement a basic server.ts in server.ts
This commit is contained in:
albert
2025-07-28 19:13:27 +02:00
parent e62796ae7d
commit fb433cfac1
4 changed files with 36 additions and 7 deletions

View File

@ -1,5 +0,0 @@
"use strict";
const helloFn = (name) => {
return `Hola ${name}`;
};
console.log(helloFn("Mundo"));

9
src/server.ts Normal file
View File

@ -0,0 +1,9 @@
// server.ts
import { Hono } from 'hono';
import { serve } from '@hono/node-server';
const app = new Hono();
app.get('/', (c) => c.text('Hello world'));
serve({ fetch: app.fetch, port: 3000 });