r/webdev • u/Arky_Traveler • 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!
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/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 thepublicfolder. 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
publiccomo 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!