wip bootstrap an express app
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"watch": ["src"],
|
||||
"ext": "ts",
|
||||
"exec": "concurrently \"npx tsc --watch\" \"ts-node src/index.ts\""
|
||||
}
|
||||
Generated
+1668
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"name": "blocknote-server",
|
||||
"version": "1.0.0",
|
||||
"license": "MIT",
|
||||
"main": "dist/index.js",
|
||||
"keywords": [
|
||||
"nodejs",
|
||||
"bootstrap",
|
||||
"express"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "npx tsc",
|
||||
"start": "node dist/index.js",
|
||||
"dev": "nodemon src/index.ts",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"dependencies": {
|
||||
"dotenv": "16.4.5",
|
||||
"express": "4.21.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/express": "5.0.0",
|
||||
"@types/node": "22.7.7",
|
||||
"concurrently": "9.0.1",
|
||||
"nodemon": "3.1.7",
|
||||
"ts-node": "10.9.2",
|
||||
"typescript": "5.6.3"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
import express, { Express, Request, Response } from "express";
|
||||
import dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
const app: Express = express();
|
||||
const port = process.env.PORT ?? 8081;
|
||||
|
||||
app.get("/", (req: Request, res: Response) => {
|
||||
res.send("Express + TypeScript Server");
|
||||
});
|
||||
|
||||
app.listen(port, () => {
|
||||
console.log(`[server]: Server is running at http://localhost:${port}`);
|
||||
});
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es2016",
|
||||
"module": "commonjs",
|
||||
"outDir": "./dist",
|
||||
"esModuleInterop": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"strict": true,
|
||||
"skipLibCheck": true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user