const { spawnSync } = require('child_process')
const { existsSync, writeFileSync } = require('fs')
const SESSION_ID = 'ADD YOUR SESSION ID' // Edit this line only, don't remove ' <- this symbol
if (!existsSync('Itxxwasi')) {
console.log('Cloning the repository...')
const cloneResult = spawnSync(
'git',
['clone', 'https://github.com/Itxxwasi/WASI-MD-V.git', 'Itxxwasi'],
{
stdio: 'inherit',
}
)
if (cloneResult.error) {
throw new Error(`Failed to clone the repository: ${cloneResult.error.message}`)
}
const configPath = 'Itxxwasi/config.env'
try {
console.log('Writing to config.env...')
writeFileSync(configPath, `VPS=true\nSESSION_ID=${SESSION_ID}`)
} catch (err) {
throw new Error(`Failed to write to config.env: ${err.message}`)
}
console.log('Installing dependencies...')
const installResult = spawnSync('yarn', ['install', '--network-concurrency', '3'], {
cwd: 'Itxxwasi',
stdio: 'inherit',
})
if (installResult.error) {
throw new Error(`Failed to install dependencies: ${installResult.error.message}`)
}
}
spawnSync('yarn', ['start'], { cwd: 'Itxxwasi', stdio: 'inherit' })
-
Notifications
You must be signed in to change notification settings - Fork 20
Itxxwasi/PANEL-DEPLOY-CODE
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published