Spaces:
Sleeping
Sleeping
T1ckbase
commited on
Commit
·
530a943
1
Parent(s):
2e0b407
test
Browse files- .vscode/settings.json +6 -0
- Dockerfile +12 -0
- deno.json +16 -0
- deno.lock +16 -0
- main.ts +9 -0
.vscode/settings.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"deno.enable": true,
|
| 3 |
+
"deno.lint": true,
|
| 4 |
+
"editor.formatOnSave": true,
|
| 5 |
+
"editor.defaultFormatter": "denoland.vscode-deno"
|
| 6 |
+
}
|
Dockerfile
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM denoland/deno:latest
|
| 2 |
+
|
| 3 |
+
EXPOSE 7860
|
| 4 |
+
|
| 5 |
+
WORKDIR /app
|
| 6 |
+
|
| 7 |
+
# Prefer not to run as root.
|
| 8 |
+
USER deno
|
| 9 |
+
|
| 10 |
+
RUN deno install --entrypoint main.ts
|
| 11 |
+
|
| 12 |
+
CMD ["run", "--allow-net", "--allow-read", "--allow-env", "main.ts"]
|
deno.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"tasks": {
|
| 3 |
+
"start": "deno --allow-net --allow-read --allow-env main.ts"
|
| 4 |
+
},
|
| 5 |
+
"imports": {
|
| 6 |
+
"@hono/hono": "jsr:@hono/hono@^4.7.1"
|
| 7 |
+
},
|
| 8 |
+
"fmt": {
|
| 9 |
+
"indentWidth": 2,
|
| 10 |
+
"lineWidth": 69420,
|
| 11 |
+
"proseWrap": "preserve",
|
| 12 |
+
"semiColons": true,
|
| 13 |
+
"singleQuote": true,
|
| 14 |
+
"useTabs": false
|
| 15 |
+
}
|
| 16 |
+
}
|
deno.lock
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"version": "4",
|
| 3 |
+
"specifiers": {
|
| 4 |
+
"jsr:@hono/hono@^4.7.1": "4.7.1"
|
| 5 |
+
},
|
| 6 |
+
"jsr": {
|
| 7 |
+
"@hono/hono@4.7.1": {
|
| 8 |
+
"integrity": "f75aaf6a026ad05406e60125a70a3d2a77e3b62991f8c4e38c624bdfc1a1dc26"
|
| 9 |
+
}
|
| 10 |
+
},
|
| 11 |
+
"workspace": {
|
| 12 |
+
"dependencies": [
|
| 13 |
+
"jsr:@hono/hono@^4.7.1"
|
| 14 |
+
]
|
| 15 |
+
}
|
| 16 |
+
}
|
main.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { Hono } from '@hono/hono';
|
| 2 |
+
|
| 3 |
+
const app = new Hono();
|
| 4 |
+
|
| 5 |
+
app.get('/', (c) => {
|
| 6 |
+
return c.text('Hello Hono!');
|
| 7 |
+
});
|
| 8 |
+
|
| 9 |
+
Deno.serve({ port: 7860 }, app.fetch);
|