add working fastify server
This commit is contained in:
1 parent
066f94188a
commit
2396bbcf12
12 files changed
+3228
-58
No files matched your search
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"semi": true,
|
||||
"arrowParens": "always",
|
||||
"singleQuote": true,
|
||||
"trailingComma": "all"
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"editor.tabSize": 2,
|
||||
"[javascript]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"editor.formatOnSave": true
|
||||
},
|
||||
"[typescript]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"editor.formatOnSave": true
|
||||
},
|
||||
"[vue]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"editor.formatOnSave": true
|
||||
},
|
||||
"[html]": {
|
||||
"editor.defaultFormatter": "vscode.html-language-features",
|
||||
"editor.formatOnSave": true
|
||||
},
|
||||
"sort-imports.on-save": true
|
||||
}
|
||||
@@ -16,6 +16,8 @@
|
||||
"dependencies": {
|
||||
"@fastify/cors": "^7.0.0",
|
||||
"fastify": "^3.29.0",
|
||||
"fastify-vite": "^3.0.0-beta.16",
|
||||
"fastify-vite-vue": "^3.0.0-beta.3",
|
||||
"gray-matter": "^4.0.3",
|
||||
"js-yaml": "^4.1.0",
|
||||
"jsonschema-definer": "^1.3.2",
|
||||
@@ -29,5 +31,11 @@
|
||||
"ts-node-dev": "^1.1.8",
|
||||
"tsconfig-paths": "^4.0.0",
|
||||
"typescript": "^4.6.4"
|
||||
},
|
||||
"importSort": {
|
||||
".js, .ts": {
|
||||
"parser": "typescript",
|
||||
"style": "module"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
import fastifyCors from '@fastify/cors';
|
||||
import fastify from 'fastify';
|
||||
|
||||
import kanjiRouter from './router/kanji';
|
||||
@@ -14,7 +13,7 @@ async function main() {
|
||||
prettyPrint: isDev,
|
||||
},
|
||||
});
|
||||
app.register(fastifyCors);
|
||||
app.register(import('@fastify/cors'));
|
||||
|
||||
app.register(kanjiRouter, {
|
||||
prefix: '/api/kanji',
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json"
|
||||
"extends": "../../tsconfig.json",
|
||||
"ts-node": {
|
||||
"transpileOnly": true,
|
||||
"compilerOptions": {
|
||||
"module": "CommonJS",
|
||||
"noImplicitAny": false
|
||||
}
|
||||
}
|
||||
}
|
||||
+1135
-10
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user