feat: Implement a new dashboard layout with sidebar, introduce project and data source management, and add various UI components.
This commit is contained in:
26
scripts/setup-auth-key.js
Normal file
26
scripts/setup-auth-key.js
Normal file
@@ -0,0 +1,26 @@
|
||||
const { generateKeyPairSync } = require('crypto');
|
||||
const { spawn } = require('child_process');
|
||||
|
||||
console.log('Generating PKCS#8 RSA Key...');
|
||||
const { privateKey } = generateKeyPairSync('rsa', {
|
||||
modulusLength: 2048,
|
||||
privateKeyEncoding: {
|
||||
type: 'pkcs8',
|
||||
format: 'pem',
|
||||
},
|
||||
});
|
||||
|
||||
console.log('Key generated. Setting JWT_PRIVATE_KEY in Convex Env...');
|
||||
|
||||
const setCmd = spawn('npx', ['convex', 'env', 'set', 'JWT_PRIVATE_KEY', '--', privateKey], {
|
||||
stdio: 'inherit'
|
||||
});
|
||||
|
||||
setCmd.on('close', (code) => {
|
||||
if (code === 0) {
|
||||
console.log('✅ Successfully set JWT_PRIVATE_KEY!');
|
||||
} else {
|
||||
console.error('❌ Failed to set JWT_PRIVATE_KEY. Exit code:', code);
|
||||
process.exit(code);
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user