Skip to content

Commit e94e782

Browse files
committed
hono overhaul
1 parent 031b45a commit e94e782

29 files changed

+572
-457
lines changed

.dockerignore

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
1-
# flyctl launch added from .gitignore
1+
**/*.DS_Store
2+
**/*.env*
3+
**/*.git
4+
**/.*dev-container
5+
**/.github
6+
**/.vscode
27
**/node_modules
3-
**/public
4-
**/.env
5-
**/.DS_Store
8+
.editorconfig
9+
.gitattributes
10+
.gitignore
11+
.prettierignore
12+
.prettierrc.json
13+
eslint.config.js
614
fly.toml
15+
import-sorter.json
16+
LICENSE
17+
README.md

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
node_modules/
2-
public/
32
.env
43
.DS_Store
5-
discs.json

.prettierignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
node_modules/
2-
public/
32
package.json

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ RESTful API for disc golf discs.
44

55
Enables developers to programmatically access public disc information from the amazing [Marshall Street Disc Golf Interactive Flight Guide](https://www.marshallstreetdiscgolf.com/flightguide) web page. Disc data is refreshed nightly via the [DiscIt API Refresh Service](https://github.com/cdleveille/discit-api-refresh).
66

7-
Check it out live on fly.io! [discit-api.fly.dev](https://discit-api.fly.dev)
7+
Check it out live on fly.io! [discit-api.fly.dev/disc](https://discit-api.fly.dev/disc)
88

99
## Public Endpoints
1010

@@ -21,7 +21,7 @@ Check it out live on fly.io! [discit-api.fly.dev](https://discit-api.fly.dev)
2121
- By multiple fields: [`/disc?brand=innova&category=control-driver`](https://discit-api.fly.dev/disc?brand=innova&category=control-driver)
2222
- By id: [`/disc/dc3616c5-c9f2-55e3-9563-83a00d0805cb`](https://discit-api.fly.dev/disc/dc3616c5-c9f2-55e3-9563-83a00d0805cb)
2323

24-
Refer to the **Fields** section below for all possible query string parameters.
24+
Refer to the **Fields** section below for all possible query string parameters, or check out the [Scalar API documentation](https://discit-api.fly.dev/reference). OpenAPI Specification .json data is also available at [discit-api.fly.dev/spec](https://discit-api.fly.dev/spec).
2525

2626
## Fields
2727

@@ -58,7 +58,7 @@ Refer to the **Fields** section below for all possible query string parameters.
5858
## Technologies
5959

6060
- [Bun](https://bun.sh/)
61-
- [Express](https://expressjs.com)
61+
- [Hono](https://hono.dev)
6262
- [MongoDB](https://www.mongodb.com)
6363
- [TypeScript](https://www.typescriptlang.org)
6464

bun.lockb

-28.1 KB
Binary file not shown.

package.json

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "discit-api",
3-
"version": "3.0.0",
3+
"version": "4.0.0",
44
"description": "RESTful API for disc golf discs.",
55
"author": "Chris Leveille <cdleveille@gmail.com",
66
"license": "MIT",
@@ -18,29 +18,23 @@
1818
"compose": "docker compose -f \"./.discit-dev-container/docker-compose.yml\" up -d --build",
1919
"lint": "eslint . && prettier --check .",
2020
"fix": "eslint --fix . && prettier --write .",
21+
"deploy": "flyctl deploy --remote-only --detach --no-cache --config fly.toml",
2122
"dev": "bun --watch ./src/index.ts",
2223
"start": "bun ./src/index.ts"
2324
},
2425
"devDependencies": {
2526
"@eslint/js": "^9.13.0",
26-
"@types/compression": "^1.7.5",
27-
"@types/cors": "^2.8.17",
27+
"@types/bun": "^1.1.13",
2828
"@types/eslint__js": "^8.42.3",
29-
"@types/express": "^5.0.0",
30-
"@types/react": "^18.3.12",
31-
"@types/react-dom": "^18.3.1",
32-
"bun-types": "^1.1.33",
3329
"eslint": "^9.13.0",
3430
"prettier": "^3.3.3",
3531
"typescript": "^5.6.3",
3632
"typescript-eslint": "^8.11.0"
3733
},
3834
"dependencies": {
39-
"compression": "^1.7.4",
40-
"cors": "^2.8.5",
41-
"express": "^4.21.1",
42-
"helmet": "^8.0.0",
43-
"mongoose": "^8.7.3",
44-
"zod": "^3.23.8"
35+
"@hono/zod-openapi": "^0.16.4",
36+
"@scalar/hono-api-reference": "^0.5.158",
37+
"hono": "^4.6.9",
38+
"mongoose": "^8.7.3"
4539
}
4640
}

src/endpoints/bag.ts

Lines changed: 0 additions & 130 deletions
This file was deleted.

src/endpoints/disc.ts

Lines changed: 0 additions & 73 deletions
This file was deleted.

src/endpoints/index.ts

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/helpers/api.ts

Lines changed: 0 additions & 72 deletions
This file was deleted.

0 commit comments

Comments
 (0)