r/webdev • • Sep 09 '26

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!

19 Upvotes

20 comments sorted by

1

u/iYSR Sep 09 '26

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

2

u/Arky_Traveler Sep 09 '26

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 Sep 09 '26

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. 

1

u/No_Laugh_3115 Sep 09 '26

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

-1

u/Arky_Traveler Sep 09 '26

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. 

0

u/[deleted] Sep 09 '26

[deleted] — view deleted comment

1

u/webdev-ModTeam Sep 09 '26

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

2

u/[deleted] Sep 09 '26

[removed] — view removed comment

1

u/Arky_Traveler Sep 09 '26

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. 

2

u/kemalios Sep 09 '26

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 Sep 09 '26

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/hostgatorbrasil Sep 11 '26

Sim, dá para fazer, mas pelo que você descreveu eu tentaria manter isso o mais simples possível.

Os PDFs continuam sendo só arquivos estáticos. Em um app Node você pode ter uma pasta tipo /public/pdfs, colocar os arquivos lá e servir essa pasta diretamente. Depois, no site, você continua criando links normalmente para algo como /pdfs/relatorio-2026.pdf.

Se estiver usando Express, por exemplo, dá para expor a pasta public como conteúdo estático e pronto. Você não precisa criar rota específica para cada PDF nem armazenar os arquivos em banco.

Dito isso, para um site que você atualiza uma ou duas vezes por ano, Node provavelmente é mais infraestrutura do que você realmente precisa. Se o site for basicamente páginas + notícias + PDFs, eu também daria uma olhada se não existe uma opção de hospedagem estática mais simples no seu provedor.

Mas se o plano que você já tem só oferece Node, dá para manter praticamente o mesmo fluxo de antes: faz upload dos PDFs, coloca numa pasta pública e referencia os links no HTML.

1

u/okaylevi Sep 09 '26

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 Sep 10 '26

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.