# FrameWork Modern With "Hono" , Could Compete with Express.js or Next.js ?: Node.js

Assalamualaikum,hello everybody i hope you all healthy, so in this article we learn about hono, hono is framework which use for node.js, why use hono? because hono is very fast, api simple and modern, function small backend, and other.

# 1\. Install Hono From Node.JS

first, we will install hono in the we directory.

**!!** remember, make sure you install in diretory the true **!!**

than we can do init

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1757901292138/f9ab53c9-051d-479e-841f-031daba374b8.png align="center")

after init, we can add new line in package.json(add esm),

```json
"type":"module"
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1757901371446/c4f1f68f-e3c4-4d9a-8bea-2b79946983fd.png align="center")

than install hono with this code

```bash
npm i hono
```

enough, you success install hono on your directory

# 2\. Testing with Hono

Second, we will test hono can progress or not ?  
than install server hono with this code:

```bash
npm i @hono/node-server
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1757901971026/fef95528-2393-46a1-a222-c041dc87725c.png align="center")

we will create new file name is `Server.js` and add this code

```javascript
import { Hono } from "hono";
import { serve } from "@hono/node-server";

const app = new Hono();

app.get("/", (c) => {
    return c.html(`
<h1> sample doc API</h1>
<p>rute available</p>
<ul>
<li><a href="/text"> - discribe text biasa</li>
<li><a href="/json"> - discribe output json</li>
</ul>
`)
}
);

app.get("/text", (c) => c.text("hallo this a normal text"));

app.get("/json", (c) => c.json({ data: "this response for JSON", Status: "ok" }));

serve(app, (info) => {
    console.log(`yes, you can do this http://localhost:${info.port}`)
})
```

and this result run the server.js

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1757904276713/b64f35d5-0aa9-434f-86bb-456a1151c4a4.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1757904391465/94791dbc-459c-4d48-968f-226f8186e7ad.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1757904414091/661e4783-d2a5-49f7-af12-2d5eb60e2590.png align="center")

# 3\. Error

honest i have many error because i am a newbie and noob.

and i forgot to screen shot my desktop, i am sorry.

# 4\. Closing

thanks for your watching , and see you next time

sorry i can’t speak english but i hope can in future
