Added cURL experiment
This commit is contained in:
parent
5d1bb2ce58
commit
13bee291bc
@ -63,7 +63,7 @@ body span.apiReference span.requestType.patch {
|
||||
background-color: #50e3c2;
|
||||
}
|
||||
|
||||
body span.apiReference span.requestType.socket {
|
||||
body span.apiReference span.requestType.other {
|
||||
background-color: #403d58;
|
||||
}
|
||||
|
||||
@ -96,7 +96,7 @@ body span.apiReference.put {
|
||||
background-color: rgba(252, 161, 48, 0.1);
|
||||
}
|
||||
|
||||
body span.apiReference.socket {
|
||||
body span.apiReference.other {
|
||||
border: 1px solid #403d58;
|
||||
background-color: rgba(64, 61, 88, 0.1);
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 3,
|
||||
"mappings": "AAAA,AAAA,IAAI,CAAC;EACD,WAAW,EAAE,+CAA+C;CAkF/D;;AAnFD,AAEI,IAFA,CAEA,GAAG,AAAA,cAAc,CAAC;EACd,WAAW,EAAE,iCAAiC;EAC9C,UAAU,EAAE,MAAM;CAMrB;;AAVL,AAKQ,IALJ,CAEA,GAAG,AAAA,cAAc,CAGb,EAAE,CAAC;EACC,SAAS,EAAE,IAAI;EACf,WAAW,EAAE,OAAO;EACpB,MAAM,EAAE,IAAI;CACf;;AATT,AAYI,IAZA,CAYA,IAAI,AAAA,aAAa,CAAC;EACd,KAAK,EAAE,OAAO;EACd,SAAS,EAAE,KAAK;EAChB,MAAM,EAAE,QAAQ;EAChB,QAAQ,EAAE,QAAQ;EAClB,OAAO,EAAE,KAAK;EACd,OAAO,EAAE,GAAG;EACZ,aAAa,EAAE,GAAG;CAuCrB;;AA1DL,AAoBQ,IApBJ,CAYA,IAAI,AAAA,aAAa,CAQb,IAAI,CAAC;EACD,SAAS,EAAE,KAAK;EAChB,KAAK,EAAE,KAAK;CACf;;AAvBT,AAwBQ,IAxBJ,CAYA,IAAI,AAAA,aAAa,CAYb,CAAC,CAAC;EACE,KAAK,EAAE,KAAK;EACZ,eAAe,EAAE,SAAS;CAC7B;;AA3BT,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AAI,AAAA,aAAa,CA2Cb,GAAG,CAAC;EACA,WAAW,EAAE,GAAG;CACnB;;AAzDT,AA2DI,IA3DA,CA2DA,IAAI,AAAA,aAAa,AAAA,IAAI,CAAC;EAClB,MAAM,EAAE,iBAAiB;EACzB,gBAAgB,EAAE,uBAAmB;CACxC;;AA9DL,AA+DI,IA/DA,CA+DA,IAAI,AAAA,aAAa,AAAA,KAAK,CAAC;EACnB,MAAM,EAAE,iBAAiB;EACzB,gBAAgB,EAAE,uBAAmB;CACxC;;AAlEL,AAmEI,IAnEA,CAmEA,IAAI,AAAA,aAAa,AAAA,MAAM,CAAC;EACpB,MAAM,EAAE,iBAAiB;EACzB,gBAAgB,EAAE,uBAAmB;CACxC;;AAtEL,AAuEI,IAvEA,CAuEA,IAAI,AAAA,aAAa,AAAA,OAAO,CAAC;EACrB,MAAM,EAAE,iBAAiB;EACzB,gBAAgB,EAAE,sBAAkB;CACvC;;AA1EL,AA2EI,IA3EA,CA2EA,IAAI,AAAA,aAAa,AAAA,IAAI,CAAC;EAClB,MAAM,EAAE,iBAAiB;EACzB,gBAAgB,EAAE,uBAAmB;CACxC;;AA9EL,AA+EI,IA/EA,CA+EA,IAAI,AAAA,aAAa,AAAA,MAAM,CAAC;EACpB,MAAM,EAAE,iBAAiB;EACzB,gBAAgB,EAAE,qBAAoB;CACzC",
|
||||
"sources": [
|
||||
"styles.scss"
|
||||
],
|
||||
|
@ -50,7 +50,7 @@ body {
|
||||
span.requestType.patch {
|
||||
background-color: #50e3c2;
|
||||
}
|
||||
span.requestType.socket {
|
||||
span.requestType.other {
|
||||
background-color: #403d58;
|
||||
}
|
||||
div {
|
||||
@ -77,7 +77,7 @@ body {
|
||||
border: 1px solid #fca130;
|
||||
background-color: rgba(252,161,48,.1);
|
||||
}
|
||||
span.apiReference.socket {
|
||||
span.apiReference.other {
|
||||
border: 1px solid #403d58;
|
||||
background-color: rgba(64, 61, 88, .1);
|
||||
}
|
||||
|
11
index.html
11
index.html
@ -27,8 +27,8 @@
|
||||
<span>Returns json object containing general information about the chat server.</span>
|
||||
</div>
|
||||
</span>
|
||||
<span class="apiReference socket">
|
||||
<span class="requestType socket">Socket</span>
|
||||
<span class="apiReference other">
|
||||
<span class="requestType other">Socket</span>
|
||||
<a href="/chat/socket.io/"><code>/chat/socket.io/</code></a><br>
|
||||
<div>
|
||||
<span>Socket.io instance used by the chat on ARNweb.</span><br><br>
|
||||
@ -45,5 +45,12 @@
|
||||
<span><a href="//www.npmjs.com/package/game-server-query#games-list">Supported games</a></span>
|
||||
</div>
|
||||
</span>
|
||||
<span class="apiReference other">
|
||||
<span class="requestType other">cURL</span>
|
||||
<code>/curl</code><br>
|
||||
<div>
|
||||
<span>Returns hello world to cURL requests.</span>
|
||||
</div>
|
||||
</span>
|
||||
</body>
|
||||
</html>
|
12
index.js
12
index.js
@ -10,6 +10,8 @@ var MarkdownIt = require('markdown-it'),
|
||||
md = new MarkdownIt();
|
||||
var users = [];
|
||||
|
||||
const style = require('ansi-styles');
|
||||
|
||||
const os = require("os");
|
||||
const si = require('systeminformation');
|
||||
var sysInfo;
|
||||
@ -106,9 +108,17 @@ app.get('/system/', function (req, res) {
|
||||
});
|
||||
});
|
||||
|
||||
// cURL
|
||||
app.get('/curl/', function (req, res) {
|
||||
res.send(`
|
||||
${style.green.open}Hello Green!${style.green.close}
|
||||
${style.red.open}Hello Red!${style.red.close}
|
||||
`);
|
||||
});
|
||||
|
||||
app.get('/css/:stylesheet', function (req, res) {
|
||||
res.sendFile(__dirname + '/css/' + req.params.stylesheet);
|
||||
})
|
||||
});
|
||||
|
||||
// Game servers
|
||||
app.get('/:type/:host', function (req, res) {
|
||||
|
27
package-lock.json
generated
27
package-lock.json
generated
@ -4,6 +4,11 @@
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"@types/color-name": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz",
|
||||
"integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ=="
|
||||
},
|
||||
"accepts": {
|
||||
"version": "1.3.7",
|
||||
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",
|
||||
@ -23,6 +28,15 @@
|
||||
"resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz",
|
||||
"integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU="
|
||||
},
|
||||
"ansi-styles": {
|
||||
"version": "4.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
|
||||
"integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
|
||||
"requires": {
|
||||
"@types/color-name": "^1.1.1",
|
||||
"color-convert": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"argparse": {
|
||||
"version": "1.0.10",
|
||||
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
|
||||
@ -150,6 +164,19 @@
|
||||
"resolved": "https://registry.npmjs.org/caseless/-/caseless-0.8.0.tgz",
|
||||
"integrity": "sha1-W8oogdQUN/VLJAfr40iIx7mtT30="
|
||||
},
|
||||
"color-convert": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
||||
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
||||
"requires": {
|
||||
"color-name": "~1.1.4"
|
||||
}
|
||||
},
|
||||
"color-name": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
||||
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
|
||||
},
|
||||
"combined-stream": {
|
||||
"version": "0.0.7",
|
||||
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-0.0.7.tgz",
|
||||
|
@ -18,6 +18,7 @@
|
||||
"author": "McArn",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"ansi-styles": "^4.2.1",
|
||||
"express": "^4.17.1",
|
||||
"game-server-query": "^1.0.10",
|
||||
"markdown-it": "^10.0.0",
|
||||
|
Loading…
Reference in New Issue
Block a user