Version 1
This commit is contained in:
parent
64808ec243
commit
e3b052650c
|
@ -0,0 +1,20 @@
|
||||||
|
var express = require("express");
|
||||||
|
var app = express()
|
||||||
|
const crypto = require('crypto');
|
||||||
|
const port = 3000
|
||||||
|
|
||||||
|
app.get('/', (req, res) => {
|
||||||
|
res.send('ok')
|
||||||
|
})
|
||||||
|
|
||||||
|
app.post('/30m', (req, res) => {
|
||||||
|
res.send(crypto.randomBytes(31457280));
|
||||||
|
})
|
||||||
|
|
||||||
|
app.post('/1m', (req, res) => {
|
||||||
|
res.sendStatus(200);
|
||||||
|
})
|
||||||
|
|
||||||
|
app.listen(port, () => {
|
||||||
|
console.log(`Connection Test is running on ${port}`)
|
||||||
|
})
|
|
@ -0,0 +1,15 @@
|
||||||
|
{
|
||||||
|
"name": "connectiontest",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "Recreation of the ConnectionTest API for Nintendo Switch",
|
||||||
|
"main": "index.js",
|
||||||
|
"scripts": {
|
||||||
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
|
},
|
||||||
|
"author": "",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"crypto": "^1.0.1",
|
||||||
|
"express": "^4.18.2"
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue