File tree 5 files changed +126
-0
lines changed
5 files changed +126
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ name : Bug report
3
+ about : Create a report to help us improve
4
+ title : ' '
5
+ labels : ' to triage'
6
+ assignees : ' '
7
+
8
+ ---
9
+
10
+ ** Describe the bug**
11
+
12
+ A clear and concise description of what the bug is.
13
+
14
+ ** To Reproduce**
15
+
16
+ ``` ts
17
+ import { serve } from " https://deno.land/std@a.b.c/http/server.ts" ;
18
+ import { Server } from " https://deno.land/x/socket_io@x.y.z/mod.ts" ;
19
+
20
+ const io = new Server ();
21
+
22
+ io .on (" connection" , (socket ) => {
23
+ console .log (` socket ${socket .id } connected ` );
24
+
25
+ socket .emit (" hello" , " world" );
26
+
27
+ socket .on (" disconnect" , (reason ) => {
28
+ console .log (` socket ${socket .id } disconnected due to ${reason } ` );
29
+ });
30
+ });
31
+
32
+ await serve (io .handler (), {
33
+ port: 3000 ,
34
+ });
35
+ ```
36
+
37
+ ** Expected behavior**
38
+
39
+ A clear and concise description of what you expected to happen.
40
+
41
+ ** Screenshots**
42
+
43
+ If applicable, add screenshots to help explain your problem.
44
+
45
+ ** Platform:**
46
+
47
+ - Device: [ e.g. Samsung S8]
48
+ - OS: [ e.g. Android 9.2]
49
+
50
+ ** Additional context**
51
+
52
+ Add any other context about the problem here.
Original file line number Diff line number Diff line change
1
+ blank_issues_enabled : false
2
+ contact_links :
3
+ - name : Ask a Question
4
+ url : https://github.com/socketio/socket.io-deno/discussions/new?category=q-a
5
+ about : Ask the community for help
Original file line number Diff line number Diff line change
1
+ ---
2
+ name : Feature request
3
+ about : Suggest an idea for this project
4
+ title : ' '
5
+ labels : ' enhancement'
6
+ assignees : ' '
7
+
8
+ ---
9
+
10
+ ** Is your feature request related to a problem? Please describe.**
11
+
12
+ A clear and concise description of what the problem is. Ex. I'm always
13
+ frustrated when [ ...]
14
+
15
+ ** Describe the solution you'd like**
16
+
17
+ A clear and concise description of what you want to happen.
18
+
19
+ ** Describe alternatives you've considered**
20
+
21
+ A clear and concise description of any alternative solutions or features you've
22
+ considered.
23
+
24
+ ** Additional context**
25
+
26
+ Add any other context or screenshots about the feature request here.
Original file line number Diff line number Diff line change
1
+ ---
2
+ name : Bug fix
3
+ about : A fix for a known issue
4
+ title : ' '
5
+ labels : ' to triage'
6
+ assignees : ' '
7
+
8
+ ---
9
+
10
+ Related issue or discussion:
Original file line number Diff line number Diff line change
1
+ ---
2
+ name : Feature implementation
3
+ about : A new awesome feature
4
+ title : ' '
5
+ labels : ' enhancement'
6
+ assignees : ' '
7
+
8
+ ---
9
+
10
+ Related issue or discussion:
11
+
12
+ ** New behavior**
13
+
14
+ ``` ts
15
+ import { serve } from " https://deno.land/std@a.b.c/http/server.ts" ;
16
+ import { Server } from " https://deno.land/x/socket_io@x.y.z/mod.ts" ;
17
+
18
+ const io = new Server ();
19
+
20
+ io .on (" connection" , (socket ) => {
21
+ console .log (` socket ${socket .id } connected ` );
22
+
23
+ socket .emit (" hello" , " world" );
24
+
25
+ socket .on (" disconnect" , (reason ) => {
26
+ console .log (` socket ${socket .id } disconnected due to ${reason } ` );
27
+ });
28
+ });
29
+
30
+ await serve (io .handler (), {
31
+ port: 3000 ,
32
+ });
33
+ ```
You can’t perform that action at this time.
0 commit comments