mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
Boilerplate Deno stuff
This commit is contained in:
commit
d855c05fac
7 changed files with 56 additions and 0 deletions
1
.tool-versions
Normal file
1
.tool-versions
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
deno 1.31.1
|
||||||
5
.vscode/extensions.json
vendored
Normal file
5
.vscode/extensions.json
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"recommendations": [
|
||||||
|
"denoland.vscode-deno"
|
||||||
|
]
|
||||||
|
}
|
||||||
4
.vscode/settings.json
vendored
Normal file
4
.vscode/settings.json
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"deno.enable": true,
|
||||||
|
"path-intellisense.extensionOnImport": true
|
||||||
|
}
|
||||||
32
deno.json
Normal file
32
deno.json
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
{
|
||||||
|
"lock": false,
|
||||||
|
"tasks": {
|
||||||
|
"dev": "deno run --allow-read --allow-env --allow-net --watch src/server.ts",
|
||||||
|
"test": "deno test"
|
||||||
|
},
|
||||||
|
"imports": {
|
||||||
|
"@/": "./src/"
|
||||||
|
},
|
||||||
|
"lint": {
|
||||||
|
"files": {
|
||||||
|
"include": ["src/"]
|
||||||
|
},
|
||||||
|
"rules": {
|
||||||
|
"tags": ["recommended"],
|
||||||
|
"exclude": ["no-explicit-any"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"fmt": {
|
||||||
|
"files": {
|
||||||
|
"include": ["src/"]
|
||||||
|
},
|
||||||
|
"options": {
|
||||||
|
"useTabs": false,
|
||||||
|
"lineWidth": 120,
|
||||||
|
"indentWidth": 2,
|
||||||
|
"semiColons": true,
|
||||||
|
"singleQuote": true,
|
||||||
|
"proseWrap": "preserve"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
7
src/app.ts
Normal file
7
src/app.ts
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
import { Hono } from '@/deps.ts';
|
||||||
|
|
||||||
|
const app = new Hono();
|
||||||
|
|
||||||
|
app.get('/', (c) => c.text('Hono!'));
|
||||||
|
|
||||||
|
export default app;
|
||||||
1
src/deps.ts
Normal file
1
src/deps.ts
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
export { Hono } from 'https://deno.land/x/hono@v3.0.2/mod.ts';
|
||||||
6
src/server.ts
Normal file
6
src/server.ts
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
import 'https://deno.land/std@0.177.0/dotenv/load.ts';
|
||||||
|
import { serve } from 'https://deno.land/std@0.177.0/http/server.ts';
|
||||||
|
|
||||||
|
import app from './app.ts';
|
||||||
|
|
||||||
|
serve(app.fetch);
|
||||||
Loading…
Add table
Reference in a new issue