-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
141 additions
and
1,030 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"trailingComma": "es5", | ||
"tabWidth": 2, | ||
"semi": true, | ||
"printWidth": 120, | ||
"singleQuote": false, | ||
"quoteProps": "as-needed", | ||
"arrowParens": "avoid", | ||
"endOfLine": "auto" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"extends": [ | ||
"plugin:react/recommended", | ||
"plugin:react/jsx-runtime", | ||
"custom" | ||
], | ||
"plugins": [ | ||
"import", | ||
"react" | ||
], | ||
"settings": { | ||
"react": { | ||
"version": "detect" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"extends": [ | ||
"plugin:react/recommended", | ||
"plugin:react/jsx-runtime", | ||
"custom" | ||
], | ||
"plugins": [ | ||
"import", | ||
"react" | ||
], | ||
"settings": { | ||
"react": { | ||
"version": "detect" | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,25 @@ | ||
/** | ||
* Welcome to Cloudflare Workers! This is your first worker. | ||
* | ||
* - Run `npm run dev` in your terminal to start a development server | ||
* - Open a browser tab at http://localhost:8787/ to see your worker in action | ||
* - Run `npm run deploy` to publish your worker | ||
* | ||
* Learn more at https://developers.cloudflare.com/workers/ | ||
*/ | ||
import { Hono } from "hono/quick"; | ||
|
||
export interface Env { | ||
// Example binding to KV. Learn more at https://developers.cloudflare.com/workers/runtime-apis/kv/ | ||
// MY_KV_NAMESPACE: KVNamespace; | ||
// | ||
// Example binding to Durable Object. Learn more at https://developers.cloudflare.com/workers/runtime-apis/durable-objects/ | ||
// MY_DURABLE_OBJECT: DurableObjectNamespace; | ||
// | ||
// Example binding to R2. Learn more at https://developers.cloudflare.com/workers/runtime-apis/r2/ | ||
// MY_BUCKET: R2Bucket; | ||
// | ||
// Example binding to a Service. Learn more at https://developers.cloudflare.com/workers/runtime-apis/service-bindings/ | ||
// MY_SERVICE: Fetcher; | ||
// | ||
// Example binding to a Queue. Learn more at https://developers.cloudflare.com/queues/javascript-apis/ | ||
// MY_QUEUE: Queue; | ||
} | ||
type Bindings = {}; | ||
|
||
export default { | ||
async fetch(request: Request, env: Env, ctx: ExecutionContext): Promise<Response> { | ||
return new Response('Hello World!'); | ||
}, | ||
}; | ||
const app = new Hono<{ Bindings: Bindings }>(); | ||
|
||
app.get("/:target/:arch/:currentVersion", async c => { | ||
const target = c.req.param("target"); | ||
const arch = c.req.param("arch"); | ||
const currentVersion = c.req.param("currentVersion"); | ||
|
||
return c.body( | ||
JSON.stringify({ | ||
target, | ||
arch, | ||
currentVersion, | ||
}), | ||
200, | ||
{ | ||
"Content-Type": "application/json", | ||
} | ||
); | ||
}); | ||
|
||
export default app; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"extends": [ | ||
"plugin:react/recommended", | ||
"plugin:react/jsx-runtime", | ||
"custom" | ||
], | ||
"plugins": [ | ||
"import", | ||
"react" | ||
], | ||
"settings": { | ||
"react": { | ||
"version": "detect" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.