Everything else remains the same (Create a new project, add typescript, add express…)
The only thing that’s different is that tsc doesn’t perform great with turborepo
You can use either tsup or esbuild for building your backend application
Create apps/backend
Initialize empty ts repo
npm init -y
npx tsc --init{
"extends": "@repo/typescript-config/base.json",
"compilerOptions": {
"lib": ["ES2015"],
"module": "CommonJS",
"outDir": "./dist",
},
"exclude": ["node_modules"],
"include": ["."]
}npm i express @types/expresssrc/index.tsimport express from "express";
const app = express()
app.get("/", (req, res) => {
res.json({
message: "hello world"
});
}){
"extends": ["//"],
"pipeline": {
"build": {
"outputs": ["dist/**"]
}
}
}npm install esbuild"build": "esbuild src/index.ts --platform=node --bundle --outdir=dist"