Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd62e499

Browse files
committed
refactor(node-framework): replace Server instance with createApp function for improved application structure
1 parentb99deaf commitd62e499

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

‎apps/node-framework/src/index.ts

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,9 @@
1-
import{Server}from"@repo/framework/server";
1+
import{createApp}from"@repo/framework";
22

3-
constserver=newServer();
4-
5-
// events
6-
server.on("request:received",()=>{
7-
console.log("Request Received!");
8-
});
9-
10-
server.on("request:processed",()=>{
11-
console.log("Request Processed!");
12-
});
3+
constapp=createApp();
134

145
// listener
156
constport=5555;
16-
server.listen(port,()=>{
7+
app.listen(port,()=>{
178
console.log(`Server is Running on port http://localhost:${port}!`);
189
});

‎packages/framework/src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,3 @@ export class Framework {
1717
}
1818

1919
exportconstcreateApp=()=>newFramework();
20-
21-
export*from"./server.js";

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp