{
"name": "todo",
"version": "1.0.0",
"main": "src/server/server.ts",
"scripts": {
"start": "nodemon src/server/server.ts"
},
"dependencies": {
"cors": "^2.8.5",
"express": "^4.21.1"
},
"devDependencies": {
"@types/cors": "^2.8.17",
"@types/node": "^22.10.1",
"@types/typescript": "^2.0.0",
"nodemon": "^3.1.7",
"ts-node": "^10.9.2",
"typescript": "^5.7.2"
}
}
{
"compilerOptions": {
"sourceMap": true,
"target": "es2022",
"module": "commonjs",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"rootDir": "./src",
"moduleResolution": "node",
"resolveJsonModule": true
},
"exclude": ["node_modules"]
}
import express from "express";
const app = express();
app.get("/",(req,res) => {
res.send("Hello");
});
app.listen(5000,"localhost",()=> {
console.log("Test2");
});