Version 1

This commit is contained in:
hedgetendo 2024-01-21 17:56:34 +00:00
parent 64808ec243
commit e3b052650c
2 changed files with 35 additions and 0 deletions

20
index.js Normal file
View File

@ -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}`)
})

15
package.json Normal file
View File

@ -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"
}
}