feat: sample backend package w/ express
This commit is contained in:
parent
63a9019b2a
commit
4ebce1448a
9 changed files with 743 additions and 16 deletions
29
apps/vdb-backend/package.json
Normal file
29
apps/vdb-backend/package.json
Normal 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"
|
||||
}
|
||||
}
|
||||
15
apps/vdb-backend/src/index.ts
Normal file
15
apps/vdb-backend/src/index.ts
Normal 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);
|
||||
});
|
||||
15
apps/vdb-backend/tsconfig.json
Normal file
15
apps/vdb-backend/tsconfig.json
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"module": "nodenext",
|
||||
"moduleResolution": "nodenext",
|
||||
"target": "ES2022",
|
||||
"strict": true,
|
||||
"noUncheckedIndexedAccess": true,
|
||||
"sourceMap": true,
|
||||
"outDir": "dist",
|
||||
"declaration": true,
|
||||
},
|
||||
"include": [
|
||||
"src"
|
||||
]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue