H
H
HellishCode2019-07-24 01:47:04
Web development
HellishCode, 2019-07-24 01:47:04

What is the solution for storing frontend statics?

Hello.
Faced the following problem.
It is necessary to store and give statics for the frontend, taking into account the fact that the frontend is a separate machine.
If you store the statics on the frontend server, then there is no problem,
but it means that you have to modify the backend (which is on a separate
machine) so that content editors can manage statics (pictures and documents) on the external
frontend server.
Maybe there are some elegant solutions?
Front on React (I use Create React App)
Advise solutions, I’ll say right away that this is the first time I’ve come across this.
Thanks

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ivan Shumov, 2019-07-24
@HellishCode

An elegant solution is to store statics in Object storage: AWS S3, Azure Blob, GCP Cloud Storage, Yandex Object Storage, .... there are many of them. If you want on your servers, then select a separate storage

F
floydback, 2019-07-24
@floydback

Если нужно, чтобы в админке редакторы загружали картинки, а они отдавались с другого сервера - нужно сразу их загружать туда. Можно на бэкенде просто примонтировать диск фронтенда и туда складывать картинки. Монтирование можно настроить при запуске сервера. В итоге, бэкенд править не придется и картинки будут на сервере фронтенда.
Не знаю, насколько элегантно, но это быстро и в принципе надежно.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question