mirror of
https://github.com/samsonjs/vibetunnel.git
synced 2026-04-27 15:17:38 +00:00
fix build script
This commit is contained in:
parent
dfc3d48dfa
commit
0a8eb8054c
1 changed files with 14 additions and 4 deletions
|
|
@ -107,13 +107,23 @@ cd "$WEB_DIR"
|
||||||
|
|
||||||
# Copy server files
|
# Copy server files
|
||||||
echo "Copying server files..."
|
echo "Copying server files..."
|
||||||
if [ -f "dist/server.js" ]; then
|
# Copy the main entry point (index.js)
|
||||||
cp dist/server.js "$NODE_SERVER_DIR/dist/"
|
if [ -f "dist/index.js" ]; then
|
||||||
cp dist/server.js.map "$NODE_SERVER_DIR/dist/" 2>/dev/null || true
|
cp dist/index.js "$NODE_SERVER_DIR/dist/"
|
||||||
|
cp dist/index.js.map "$NODE_SERVER_DIR/dist/" 2>/dev/null || true
|
||||||
fi
|
fi
|
||||||
|
# Copy server directory
|
||||||
if [ -d "dist/server" ]; then
|
if [ -d "dist/server" ]; then
|
||||||
cp -r dist/server "$NODE_SERVER_DIR/dist/"
|
cp -r dist/server "$NODE_SERVER_DIR/dist/"
|
||||||
fi
|
fi
|
||||||
|
# Copy client directory if it exists
|
||||||
|
if [ -d "dist/client" ]; then
|
||||||
|
cp -r dist/client "$NODE_SERVER_DIR/dist/"
|
||||||
|
fi
|
||||||
|
# Copy test directory if it exists
|
||||||
|
if [ -d "dist/test" ]; then
|
||||||
|
cp -r dist/test "$NODE_SERVER_DIR/dist/"
|
||||||
|
fi
|
||||||
|
|
||||||
# Copy public files (static assets)
|
# Copy public files (static assets)
|
||||||
echo "Copying static assets..."
|
echo "Copying static assets..."
|
||||||
|
|
@ -219,7 +229,7 @@ if (!process.env.PORT) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Launch the actual server
|
// Launch the actual server
|
||||||
const serverPath = path.join(__dirname, 'dist', 'server.js');
|
const serverPath = path.join(__dirname, 'dist', 'index.js');
|
||||||
const server = spawn(process.execPath, [serverPath], {
|
const server = spawn(process.execPath, [serverPath], {
|
||||||
stdio: 'inherit',
|
stdio: 'inherit',
|
||||||
env: process.env
|
env: process.env
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue