feat: sample backend package w/ express

This commit is contained in:
Benjamin Singleton 2025-06-10 17:11:14 -05:00 committed by Sheldon Cooper
parent 63a9019b2a
commit 4ebce1448a
9 changed files with 743 additions and 16 deletions

View file

@ -0,0 +1,29 @@
{
"name": "@repo/vdb-backend",
"version": "1.0.0",
"description": "",
"type": "module",
"exports": {
"./*": {
"types": "./dist/*.d.ts",
"import": "./dist/*.js"
}
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "pnpm exec tsc",
"start": "pnpm exec tsx src/index"
},
"keywords": [],
"author": "",
"license": "ISC",
"packageManager": "pnpm@10.11.0",
"dependencies": {
"@repo/common": "workspace:*",
"express": "^5.1.0"
},
"devDependencies": {
"@types/express": "^5.0.3",
"tsx": "^4.19.4"
}
}

View file

@ -0,0 +1,15 @@
import { SAMPLE } from "@repo/common/sample";
import express from "express";
const PORT = 1224;
const app = express();
app.get("/sample", (_req, res) => {
res.status(200).send(SAMPLE);
});
app.listen(PORT, () => {
console.log(`Backend started @ http://localhost:${PORT} !`);
console.log(SAMPLE);
});

View file

@ -0,0 +1,15 @@
{
"compilerOptions": {
"module": "nodenext",
"moduleResolution": "nodenext",
"target": "ES2022",
"strict": true,
"noUncheckedIndexedAccess": true,
"sourceMap": true,
"outDir": "dist",
"declaration": true,
},
"include": [
"src"
]
}