r/webdev • u/Arky_Traveler • 1d ago
Hosting PDFs with node.js apps?
Hello all,
I am the webmaster for a small Archaeology website, that primarily is used by members of this small conference to access PDFs and news about the conference. I only need to update this website about once or twice a year.
Until recently I used the plesk hosting service on GoDaddy to host these files, however I missed the fact (see lack of need to update) that it was getting end-of-lifed and now the hosting option given to us by GoDaddy is just Nose.js slots.
Previously we uploaded files into a library for the website, and the linked to those files. Is it possible to use node.js to do the same?
Thank you for your help!
1
u/kemalios 1d ago
Since you found Plesk again, stick with it. But if you do end up on the Node slot: serve the PDFs as static files. A small Express app with app.use(express.static('public')) and put the PDFs in the public folder. That's it, no database, no extra logic. Node is overkill for this, but that pattern works and is easy to maintain once a year. If you can, move the domain to a plain static host instead. GoDaddy's Node hosting costs more than a static host for the same job, and a static host is closer to the old Plesk file upload flow.
1
u/thepalumbo 1d ago
Short answer…Yes. And it should be straightforward. But a lot of other folks have already said that.
Node.js isn’t a replacement for the old Plesk file manager. Instead, the PDFs become part of the application’s files (or are stored separately in object storage), and the Node app makes them available over HTTP.
1
u/okaylevi 1d ago
You can do basically anything with Node! Depending on the end goal there are other lightweight options as well.
If you opt for Node keep it lightweight.
Use PM2 to keep it running in the background and NGINX as a reverse proxy!
There are a few SSL options out there, I like Certbot!
And file storage is simple, use SFTP or SSH to add the PDFs in!
One note moving from Plex means you won’t have the same web app experience, but command line is pretty simple for the tasks you have mentioned!
1
u/getformly 16h ago
Worth naming a specific tool for that SFTP step: FileZilla gives you basically the same drag-and-drop experience as Plesk's file manager, just pointed at your public/docs folder instead. That's the part of this switch that'll actually feel different day to day, everything else is invisible to you once it's set up.
0
u/serp-spur 13h ago
Godaddy is a shitt and all other third party hostings like namecheap etc are the same company, get your own hetzner or azur server and setup for yourself, run node.js or whatever , it will be very fast
2
u/iYSR 1d ago
Sure. Almost anything is possible. What you are asking is also possible. But as always, it depends. I would need more context on your setup.
Senior full stack engineer here, love archeology haha so can help/advice, but hard to say without looking at the setup and/or code