I have a app hosted on Netlify & Heroku, its all working. But I have to start it up after while. Is there a way I can keep the server running without downtime?
Heroku Web dynos at the free tier shut down when idle, but they restart themselves when they receive https requests. The first request (in the morning, maybe) takes a a few seconds because it waits while the dyno starts and launches your program. But the starting happens transparently, except for the delay.
If you pay for a higher-cost Heroku tier you can set up your dynos to keep running even when they have no traffic.
There's a problem with shutdown / restart: after restart any files you've saved from your Heroku app in the dyno's file system are gone. I have worked around this successfully by using the free tier of Heroku's Redis service instead of files to persist stuff. Heroku also has a free tier of postgreSQL. The Redis and postgreSQL services don't shut down or lose your data when your dynos are idle.
Netlify doesn't shut down my services when they're idle.
All this works fine for me.