chore: updates from PR #57 0e0850e7
Steve · 2026-02-15 16:10 4 file(s) · +55 −44
README.md +1 −1
49 49
```typescript src/index.ts
50 50
import { Hono } from 'hono'
51 51
import { cors } from 'hono/cors'
52 -
import type { ApiResponse } from 'shared/dist'
52 +
import type { ApiResponse } from 'shared'
53 53
54 54
const app = new Hono()
55 55
server/package.json +21 −15
1 1
{
2 -
  "name": "server",
3 -
  "version": "0.0.1",
4 -
  "main": "dist/index.js",
5 -
  "types": "dist/index.d.ts",
6 -
  "scripts": {
7 -
    "build": "tsc",
8 -
    "dev": "bun --watch run src/index.ts"
9 -
  },
10 -
  "dependencies": {
11 -
    "hono": "^4.10.8",
12 -
    "shared": "workspace:*"
13 -
  },
14 -
  "devDependencies": {
15 -
    "@types/bun": "latest"
16 -
  }
2 +
	"name": "server",
3 +
	"version": "0.0.1",
4 +
	"main": "dist/index.js",
5 +
	"types": "dist/index.d.ts",
6 +
	"exports": {
7 +
		".": {
8 +
			"types": "./dist/index.d.ts",
9 +
			"default": "./dist/index.js"
10 +
		}
11 +
	},
12 +
	"scripts": {
13 +
		"build": "tsc",
14 +
		"dev": "bun --watch run src/index.ts"
15 +
	},
16 +
	"dependencies": {
17 +
		"hono": "^4.10.8",
18 +
		"shared": "workspace:*"
19 +
	},
20 +
	"devDependencies": {
21 +
		"@types/bun": "latest"
22 +
	}
17 23
}
server/src/index.ts +16 −17
1 -
import { Hono } from 'hono'
2 -
import { cors } from 'hono/cors'
3 -
import type { ApiResponse } from 'shared/dist'
1 +
import { Hono } from "hono";
2 +
import { cors } from "hono/cors";
3 +
import type { ApiResponse } from "shared";
4 4
5 -
const app = new Hono()
5 +
const app = new Hono();
6 6
7 -
app.use(cors())
7 +
app.use(cors());
8 8
9 -
app.get('/', (c) => {
10 -
  return c.text('Hello Hono!')
11 -
})
9 +
app.get("/", (c) => {
10 +
	return c.text("Hello Hono!");
11 +
});
12 12
13 -
app.get('/hello', async (c) => {
14 -
15 -
  const data: ApiResponse = {
16 -
    message: "Hello BHVR!",
17 -
    success: true
18 -
  }
13 +
app.get("/hello", async (c) => {
14 +
	const data: ApiResponse = {
15 +
		message: "Hello BHVR!",
16 +
		success: true,
17 +
	};
19 18
20 -
  return c.json(data, { status: 200 })
21 -
})
19 +
	return c.json(data, { status: 200 });
20 +
});
22 21
23 -
export default app
22 +
export default app;
shared/package.json +17 −11
1 1
{
2 -
  "name": "shared",
3 -
  "version": "0.0.1",
4 -
  "main": "dist/index.js",
5 -
  "types": "dist/index.d.ts",
6 -
  "scripts": {
7 -
    "build": "tsc",
8 -
    "dev": "tsc --watch"
9 -
  },
10 -
  "devDependencies": {
11 -
    "typescript": "^5.9.3"
12 -
  }
2 +
	"name": "shared",
3 +
	"version": "0.0.1",
4 +
	"main": "dist/index.js",
5 +
	"types": "dist/index.d.ts",
6 +
	"exports": {
7 +
		".": {
8 +
			"types": "./dist/index.d.ts",
9 +
			"default": "./dist/index.js"
10 +
		}
11 +
	},
12 +
	"scripts": {
13 +
		"build": "tsc",
14 +
		"dev": "tsc --watch"
15 +
	},
16 +
	"devDependencies": {
17 +
		"typescript": "^5.9.3"
18 +
	}
13 19
}