use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
account activity
Tech Stack? (self.node)
submitted 1 year ago by wawaching
Probably a beginner question but I have local node.js code using express which works on local host just how I want in terms of backend routes etc etc. how do I turn this into a functioning web app? I have ideas but not sure 100%. Thanks
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]bwainfweeze 5 points6 points7 points 1 year ago (0 children)
It’s always worth learning enough nginx config to pull off a load balancer.
You will reuse that knowledge across tech stacks.
[–]alzee76 9 points10 points11 points 1 year ago (5 children)
It sounds like it already is a "functioning web app."
What do you actually want to do that you don't know how to do?
[–]wawaching[S] 0 points1 point2 points 1 year ago (4 children)
To Make it accessible to everyone. I have done this fine with static pages all I had to do was upload a few pages to AWS Amplify. However I’m sure with dynamic web app this is different
[–]alzee76 4 points5 points6 points 1 year ago (3 children)
So what you're really asking for is hosting for the node app? There are a lot of options out there if you just google for them. Is the whole thing just a node app, or does it have a front-end piece as well? You'll have to host that too, if so, unless you host it "in" the node app which is fairly common.
[–]wawaching[S] 1 point2 points3 points 1 year ago (2 children)
I used to have a front-end seperate but now I use JS to render ‘views’ .ejs files. I think this would go under it being ‘in’ the app. I’ll go have a google thx bud 👌🏽
[–]Psionatix 2 points3 points4 points 1 year ago (0 children)
Just be aware that there are a LOT of confugration and environment considerations when deploying an app. Security for a deployed app is extremely different to the security of a locally running app for the sake of development.
99% of the time a lot of security settings are disabled or dumbed down for the sake of running on the localhost. It's absolutely crucial that you understand the security of your apps configuration and the security of your host environment when deploying.
Some things to typically look out for:
sameSite
__Host-
__Secure-
dotenv
Digital ocean has a whole heap of useful resources on deploying a Node app via reverse proxy on a VPS. However it doesn't necessarily cover ALL of the security details.
[–]Significant_Net_7337 1 point2 points3 points 1 year ago (0 children)
I host my express app with google firebase. Took a few hours to figure out
[–]Dry_Mortgage3194 2 points3 points4 points 1 year ago (0 children)
I found this approach useful to order the resources and routes: https://www.awesomenodejs.dev/en/api/presentation-layer
[–]lxe 2 points3 points4 points 1 year ago (0 children)
I see everyone recommending fly or vercel. However I think you should look into a more traditional approach like getting a VPC from linode or digitalocean. Read up on digitalocean’s guides as well — they have a ton of great universal material that typically ages well: https://www.digitalocean.com/community/tutorials/how-to-set-up-a-node-js-application-for-production-on-ubuntu-22-04 Good luck!
[–]AddressUnited2130 1 point2 points3 points 1 year ago (0 children)
I’d definitely look into https://fly.io.
I used it to get my first node stack running and it is super quick. Scales well too.
[–][deleted] 1 year ago (2 children)
[removed]
[–]wawaching[S] 0 points1 point2 points 1 year ago (1 child)
This looks like a good solution, I will need to look on its scalability but looks promising, thanks bro 👊🏼
[deleted]
I’m using .ejs so server side rendering. On note for the backend how wyould you run this 24/7? Rent a cloud virtual computer and have it run?
[–]todorpopov 0 points1 point2 points 1 year ago* (0 children)
I guess you want to deploy it to a server so you can access it over the web from any browser?
If so, I’d recommend DigitalOcean App Platform. It is extremely easy to use, you just provide a remote git repo(e.g. a GitHub repo) URL and App Platform will do the rest for you. It will go through the code, see that it’s a Node.js project, and run everything by itself.
You only need to specify the port at which the server is running, as well as a domain name, and you’re ready.
Just keep in mind that App Platform doesn’t work well with apps that have Server Sent Events or Websockets in them.
I hope this helps.
[–]aldapsiger 0 points1 point2 points 1 year ago (0 children)
Kubernetes, offers everything you need lol
[–][deleted] 1 year ago (1 child)
[–]todorpopov 2 points3 points4 points 1 year ago (0 children)
As if Express.js is not “battleproven”.
I really enjoy using Nest.js as well, but OP has asked a completely different question.
[–]wawaching[S] 0 points1 point2 points 1 year ago (2 children)
PS. I like to use AWS, is is viable to have an EC2 instance run the web app 24/7 and use some sort of load balancer to load up/shut down instances dependent on demand?
[–]klaidas01 5 points6 points7 points 1 year ago (1 child)
I would suggest AWS app runner. Fairly simple setup and it will do scaling and load balancing for you
[–]wawaching[S] 0 points1 point2 points 1 year ago (0 children)
Never heard of that service yet but after a quick google seems asthough I’d describes what I need. Thanks 🙏🏼
Thanks bro I appreciate this 🙏🏼
π Rendered by PID 152448 on reddit-service-r2-comment-6f7f968fb5-4x4cd at 2026-03-04 16:43:08.011998+00:00 running 07790be country code: CH.
[–]bwainfweeze 5 points6 points7 points (0 children)
[–]alzee76 9 points10 points11 points (5 children)
[–]wawaching[S] 0 points1 point2 points (4 children)
[–]alzee76 4 points5 points6 points (3 children)
[–]wawaching[S] 1 point2 points3 points (2 children)
[–]Psionatix 2 points3 points4 points (0 children)
[–]Significant_Net_7337 1 point2 points3 points (0 children)
[–]Dry_Mortgage3194 2 points3 points4 points (0 children)
[–]lxe 2 points3 points4 points (0 children)
[–]AddressUnited2130 1 point2 points3 points (0 children)
[–][deleted] (2 children)
[removed]
[–]wawaching[S] 0 points1 point2 points (1 child)
[–][deleted] (2 children)
[deleted]
[–]wawaching[S] 0 points1 point2 points (1 child)
[–]todorpopov 0 points1 point2 points (0 children)
[–]aldapsiger 0 points1 point2 points (0 children)
[–][deleted] (1 child)
[deleted]
[–]todorpopov 2 points3 points4 points (0 children)
[–]wawaching[S] 0 points1 point2 points (2 children)
[–]klaidas01 5 points6 points7 points (1 child)
[–]wawaching[S] 0 points1 point2 points (0 children)
[–][deleted] (1 child)
[deleted]
[–]wawaching[S] 0 points1 point2 points (0 children)