mirror of
https://github.com/linsa-io/linsa.git
synced 2026-01-12 12:20:23 +01:00
Update pnpm lock with new dependencies and add flow test project with setup, dev, and test scripts
This commit is contained in:
38
testing/flow-test/packages/web/index.js
Normal file
38
testing/flow-test/packages/web/index.js
Normal file
@@ -0,0 +1,38 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
|
||||
// Load .env
|
||||
const envPath = path.join(__dirname, '.env')
|
||||
if (fs.existsSync(envPath)) {
|
||||
const envContent = fs.readFileSync(envPath, 'utf8')
|
||||
envContent.split('\n').forEach(line => {
|
||||
if (line && !line.startsWith('#')) {
|
||||
const [key, ...valueParts] = line.split('=')
|
||||
if (key) {
|
||||
process.env[key.trim()] = valueParts.join('=').trim()
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
console.log('=== Flow Test Dev Server ===')
|
||||
console.log('')
|
||||
console.log('Environment loaded:')
|
||||
|
||||
const envVars = Object.keys(process.env)
|
||||
.filter(k => !k.startsWith('_') && !k.startsWith('npm_') && !['PATH', 'HOME', 'USER', 'SHELL', 'TERM', 'LANG', 'PWD', 'OLDPWD', 'SHLVL'].includes(k))
|
||||
.sort()
|
||||
|
||||
envVars.forEach(key => {
|
||||
const value = process.env[key]
|
||||
const display = value && value.length > 20 ? value.slice(0, 20) + '...' : value
|
||||
console.log(` ${key}: ${display || '(empty)'}`)
|
||||
})
|
||||
|
||||
console.log('')
|
||||
console.log('Server running... (Ctrl+C to stop)')
|
||||
|
||||
// Keep alive
|
||||
setInterval(() => {}, 1000)
|
||||
Reference in New Issue
Block a user