Skip to content

Commit b890882

Browse files
author
David Reed
committed
refactor some
1 parent b810074 commit b890882

13 files changed

+4174
-111
lines changed

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/node_modules
2+
/.vscode

.eslintrc.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"root": true,
3+
"env": {
4+
"node": true,
5+
"es2021": true
6+
},
7+
"extends": [
8+
"eslint:recommended"
9+
],
10+
"parserOptions": {
11+
"ecmaVersion": "latest",
12+
"sourceType": "module"
13+
},
14+
"globals": {
15+
"global": true
16+
},
17+
"rules": {
18+
"indent": "off",
19+
"quotes": "off",
20+
"no-mixed-spaces-and-tabs": "off",
21+
"no-lone-blocks": "off",
22+
"eqeqeq": "error",
23+
"prefer-const": "error",
24+
"no-var": "error",
25+
"no-constant-condition": [
26+
"error",
27+
{
28+
"checkLoops": false
29+
}
30+
]
31+
}
32+
}

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
/node_modules
2-
/package-lock.json
2+
/.vscode

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/node_modules
2+
/.vscode

.prettierrc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"useTabs": true,
3+
"arrowParens": "avoid",
4+
"singleQuote": true
5+
}

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,20 @@ This is an example of a ping WebSocket server.
55
## Quickstart
66

77
1. Clone this repository
8+
89
```sh
910
git clone https://github.com/tomphttp/websocket-echo.git
1011
cd websocket-echo
1112
```
13+
1214
2. Install dependencies
15+
1316
```sh
1417
npm install
1518
```
19+
1620
3. Run the server
21+
1722
```sh
18-
node ./app.mjs --port 80 --host 127.0.0.1
19-
```
23+
npm start -- --port 80 --host 127.0.0.1
24+
```

app.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)