Skip to content

Commit 02bd603

Browse files
committed
init server
1 parent b3d0cf0 commit 02bd603

File tree

4 files changed

+33
-0
lines changed

4 files changed

+33
-0
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
package-lock.json

build/index.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
const express = require("express");
2+
const app = express();
3+
const port = 420;
4+
app.get("/", (req, res) => {
5+
res.send("Hello World");
6+
});
7+
app.listen(port, () => {
8+
console.log("server started on port " + port);
9+
});

src/index.ts

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
const express = require("express");
2+
const app = express();
3+
4+
const port = 420;
5+
6+
app.get("/", (req, res)=>{
7+
res.send("Hello World");
8+
});
9+
10+
app.listen(port, ()=>{
11+
console.log("server started on port " + port);
12+
});

tsconfig.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"compilerOptions":{
3+
"target": "esnext",
4+
"watch":true,
5+
"outDir":"./build"
6+
},
7+
"watchOptions":{
8+
"watchDirectory":"useFsEvents"
9+
}
10+
}

0 commit comments

Comments
 (0)