initial commit

This commit is contained in:
Florian Zumpe
2026-06-16 10:31:41 +02:00
parent e607876d37
commit eb559b16fb
282 changed files with 3118 additions and 41422 deletions
+24
View File
@@ -0,0 +1,24 @@
import assert from 'node:assert/strict';
import fs from 'node:fs/promises';
import path from 'node:path';
import test from 'node:test';
const root = path.resolve(import.meta.dirname, '..');
async function read(relativePath) {
return fs.readFile(path.join(root, relativePath), 'utf8');
}
test('default server socket is the Atlas loopback endpoint', async () => {
const configSource = await read('src/config.js');
const envExample = await read('.env.example');
const serverSource = await read('server.js');
assert.match(configSource, /process\.env\.HOST \|\| '127\.0\.0\.1'/);
assert.match(configSource, /process\.env\.PORT \|\| '47145'/);
assert.match(configSource, /process\.env\.INSTANCE_NAME \|\| 'Atlas'/);
assert.match(envExample, /^HOST=127\.0\.0\.1$/m);
assert.match(envExample, /^PORT=47145$/m);
assert.match(envExample, /^INSTANCE_NAME=Atlas$/m);
assert.match(serverSource, /config\.instanceName/);
});