Elysia init

This commit is contained in:
Zoe Roux 2024-10-19 19:41:04 +02:00
parent f59dd37825
commit 9e4076e1ea
No known key found for this signature in database
6 changed files with 79 additions and 0 deletions

42
api/.gitignore vendored Normal file
View File

@ -0,0 +1,42 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
# next.js
/.next/
/out/
# production
/build
# misc
.DS_Store
*.pem
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# local env files
.env.local
.env.development.local
.env.test.local
.env.production.local
# vercel
.vercel
**/*.trace
**/*.zip
**/*.tar.gz
**/*.tgz
**/*.log
package-lock.json
**/*.bun

BIN
api/bun.lockb Executable file

Binary file not shown.

17
api/package.json Normal file
View File

@ -0,0 +1,17 @@
{
"name": "api",
"version": "1.0.50",
"scripts": {
"dev": "bun --watch src/index.ts",
"build": "bun build src/index.ts --target bun --outdir ./dist",
"start": "NODE_ENV=production bun dist/index.js",
"test": "bun test"
},
"dependencies": {
"elysia": "latest"
},
"devDependencies": {
"bun-types": "latest"
},
"module": "src/index.js"
}

5
api/src/index.ts Normal file
View File

@ -0,0 +1,5 @@
import { Elysia } from "elysia";
const app = new Elysia().get("/", () => "Hello Elysia").listen(3000);
console.log(`🦊 Elysia is running at ${app.server?.hostname}:${app.server?.port}`);

14
api/tsconfig.json Normal file
View File

@ -0,0 +1,14 @@
{
"compilerOptions": {
"target": "ES2021",
"module": "ES2022",
"moduleResolution": "node",
"types": [
"bun-types"
],
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true
}
}

View File

@ -42,6 +42,7 @@ in
sqlc sqlc
go-swag go-swag
robotframework-tidy robotframework-tidy
bun
]; ];
DOTNET_ROOT = "${dotnet}"; DOTNET_ROOT = "${dotnet}";