Thank you @rubys ,
It is helpful. Yes I m not bundling foreman into my Gemfile dependencies.
I wanted to get rid of foreman, so can I do the following in server task definition of fly.rake ?
task :server => :swapfile do
sh 'bin/rails server'
sh 'bin/vite my-node-server-script'
end