Skip to content

Commit

Permalink
docs: add usage with ES modules (#4195)
Browse files Browse the repository at this point in the history
  • Loading branch information
anderslatif authored Nov 30, 2021
1 parent 2071a66 commit e5897dd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,14 @@ io.on('connection', client => { ... });
io.listen(3000);
```

### Module syntax

```js
import { Server } from "socket.io";
const io = new Server(server);
io.listen(3000);
```

### In conjunction with Express

Starting with **3.0**, express applications have become request handler
Expand Down

0 comments on commit e5897dd

Please sign in to comment.