ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Janady13/thatstupidcomputer / scripts/preview.mjs

Source identity, revision, and recovered contents.

GitHub sourceSource text recovered

Source identity

FieldRecorded value
Source typeGitHub source
Original recordJanady13/thatstupidcomputer / scripts/preview.mjs
DateNot specified in source
RepositoryJanady13/thatstupidcomputer
Revision57555cde46910102dd25d6c1c1fb2c359e9655bd
Branchmain
Path or archive memberscripts/preview.mjs
Original SHA-256a90cb40c353822ab1296d4db816c32de62d469b812901a55375021d04a474236
Git blob SHAeee095ea8e8d523076df5a7dac493a190ce31c24
Reading-copy SHA-256a90cb40c353822ab1296d4db816c32de62d469b812901a55375021d04a474236

Original source ↗

Recovered source transcript

import { spawn } from 'node:child_process'; import { existsSync } from 'node:fs'; import { fileURLToPath } from 'node:url'; const root = fileURLToPath(new URL('..', import.meta.url)); process.chdir(root); if (!existsSync('apps/api/dist/server.mjs') || !existsSync('apps/web/dist/index.html')) throw new Error('Run npm run build before preview.'); if (existsSync('.env')) process.loadEnvFile('.env'); const port = process.env.PREVIEW_PORT || '4173'; const child = spawn(process.execPath, ['apps/api/dist/server.mjs'], { cwd: root, stdio: 'inherit', env: { ...process.env, NODE_ENV: 'development', HOST: '127.0.0.1', PORT: port, PUBLIC_ORIGIN: `http://localhost:${port}`, ALLOWED_ORIGINS: `http://localhost:${port},http://127.0.0.1:${port}`, }, }); process.on('SIGINT', () => child.kill('SIGINT')); process.on('SIGTERM', () => child.kill('SIGTERM')); child.on('error', error => { console.error(error.message); process.exitCode = 1; }); child.on('exit', code => { process.exitCode = code || 0; });

Search equations, builds, manuscript text, and recovered sources.