WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 3c7f488

Browse files
committed
make example esm
1 parent da243ce commit 3c7f488

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ $ eaglerrelayjs --port 8080
2525

2626
### Existing App
2727
```js
28-
const http = require('http');
29-
const express = require('express');
30-
const { EaglerSPRelay } = require('eaglerrelayjs');
28+
import http from 'http';
29+
import express from 'express';
30+
import { EaglerSPRelay } from 'eaglerrelayjs';
3131

3232
const app = express();
3333
const server = http.createServer(app);

src/server/EaglerSPRelay.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import { RelayPacket01ICEServers } from '../pkt/RelayPacket01ICEServers';
1212
import { RelayPacket69Pong } from '../pkt/RelayPacket69Pong';
1313
import { RelayVersion } from '../utils/RelayVersion';
1414
import { LocalWorld, RelayPacket07LocalWorlds } from '../pkt/RelayPacket07LocalWorlds';
15-
import '../pkt/RegisterPackets';
1615
import { SocketAddress } from '../utils/SocketAddress';
16+
import '../pkt/RegisterPackets';
1717

1818
export class EaglerSPRelay {
1919
private readonly WSS: WebSocketServer;

0 commit comments

Comments
 (0)