diff --git a/api/.gitignore b/api/.gitignore new file mode 100644 index 00000000..87e56100 --- /dev/null +++ b/api/.gitignore @@ -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 \ No newline at end of file diff --git a/api/bun.lockb b/api/bun.lockb new file mode 100755 index 00000000..327eb02f Binary files /dev/null and b/api/bun.lockb differ diff --git a/api/package.json b/api/package.json new file mode 100644 index 00000000..8fc08dd1 --- /dev/null +++ b/api/package.json @@ -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" +} diff --git a/api/src/index.ts b/api/src/index.ts new file mode 100644 index 00000000..8f28d368 --- /dev/null +++ b/api/src/index.ts @@ -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}`); diff --git a/api/tsconfig.json b/api/tsconfig.json new file mode 100644 index 00000000..e03f1d36 --- /dev/null +++ b/api/tsconfig.json @@ -0,0 +1,14 @@ +{ + "compilerOptions": { + "target": "ES2021", + "module": "ES2022", + "moduleResolution": "node", + "types": [ + "bun-types" + ], + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true + } +} diff --git a/shell.nix b/shell.nix index 22e5f9c8..7e882007 100644 --- a/shell.nix +++ b/shell.nix @@ -42,6 +42,7 @@ in sqlc go-swag robotframework-tidy + bun ]; DOTNET_ROOT = "${dotnet}";