-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
50 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ | |
"author": "", | ||
"license": "ISC", | ||
"devDependencies": { | ||
"@types/node": "^22.5.1", | ||
"typescript": "^5.5.4" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import http from 'http'; | ||
|
||
class Application { | ||
private httpServer: http.Server | null = null; | ||
|
||
listen(port: number) { | ||
this.httpServer = http.createServer((req, res) => { | ||
res.writeHead(200, { 'Content-Type': 'application/json' }); | ||
res.end(JSON.stringify({ | ||
data: 'Hello World!', | ||
}) | ||
)}); | ||
this.httpServer.listen(port); | ||
} | ||
} | ||
|
||
export default Application; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import Application from "./application"; | ||
|
||
export function createApplication() { | ||
const app = new Application(); | ||
return app; | ||
} | ||
|
||
export default createApplication; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
export const add = (a: number, b: number) => { | ||
return a + b; | ||
} | ||
import express from "./express"; | ||
|
||
export { | ||
express, | ||
} | ||
|
||
export default express; |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { express } from '../src/index'; | ||
|
||
const app = express(); | ||
app.listen(2309); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.