diff --git a/start.sh b/start.sh index 5b5de97..2414fc3 100644 --- a/start.sh +++ b/start.sh @@ -46,19 +46,8 @@ stop_server() { start_server() { if ! is_server_running; then log "Starting Node server..." - # Start the server in foreground - npm run start & - NODE_PID=$! - sleep 2 # Wait for the server to start - - if is_server_running; then - log "Node server started successfully" - # Bring the process to foreground - fg %1 - else - log "ERROR: Failed to start Node server" - exit 1 - fi + # Run npm start directly in foreground + npm run start else log "Node server is already running" fi @@ -91,8 +80,4 @@ fi log "Database migrations completed successfully" # Start the server -start_server - -# Monitor server and restart if it stops -log "Server started. You can now interact with the Node.js console." -wait $NODE_PID \ No newline at end of file +start_server \ No newline at end of file