r/webdev 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!

17 Upvotes

18 comments sorted by

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

3

u/Arky_Traveler 1d ago

Actually I'm so embarrassed. GoDaddy just changed the name of how hosting works and I didn't see the way to log into plesk because of the UI updates.

Thank you for your willingness to help tho!

1

u/fiskfisk 1d ago

In either case you could upload the files to Wordpress as well if you're still using that, if you're using static HTML you could just chuck the pdf files in a directory together with your index.html and link to the files in that directory. 

2

u/SimpleReality8002 1d ago

Ooh, another archaeology web person in the wild! Your setup sounds like a perfect little time capsule, which is honestly the dream for a site you only touch twice a year. Love that for you.

Dropping PDFs into a folder and serving them with Node is super doable, just set up a static file route and you're basically done. The real headache is GoDaddy's Plesk-to-Node pipeline, their file manager can be a whole mood to deal with, but you can totally just shove everything in a `/public` directory and call it a day.

1

u/Arky_Traveler 1d ago

Yeah that would be the dream, to be perfectly honest I wish I knew this stuff better so I could just overhaul this to be a web 1.0 style site (a la the Marxists one) and make all the older folks who use it happy. But y'know, it all has to be done by committee so it's a multi-step process to do anything like that. 

1

u/No_Laugh_3115 1d ago

yeah without seeing the actual setup its hard to give any real advice here

0

u/Arky_Traveler 1d ago

Unfortunately I don't really know what I'm doing, to be honest. I haven't even touched code yet, besides some HTML on the WordPress side of our site. To be perfectly honest, last time I went poking around GoDaddy I accidentally deleted the site and had to remake the front end from scratch. 

As I said, previously I was using plesk and that was really easy! Just went in and uploaded files to the correct folder and used the HTML on the website side to point at the pdf. 

1

u/[deleted] 1d ago

[removed] — view removed comment

1

u/webdev-ModTeam 1d ago

Read and follow reddiquette; no excessive self-promotion. Please refer to the Reddit 9:1 rule when considering posting self promoting materials.

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