thevahidal / soul

🕉 A SQLite REST and realtime server
https://thevahidal.github.io/soul/
MIT License
1.45k stars 49 forks source link

Serve static files over express server #161

Closed faisalsiddique4400 closed 1 month ago

faisalsiddique4400 commented 4 months ago

Is your feature request related to a problem? Please describe. Soul currently lacks support for serving static media files. It is essential to implement a configuration option in Soul to enable the serving of static files.

Describe the solution you'd like A customizable feature, similar to extensions, should be provided, allowing users to specify a folder path for serving its contents statically.

Additional context This wrapper is highly compatible with react-admin. If react-admin facilitates handling the upload of media files (such as images) and storing their URLs in the database, Soul should also provide a mechanism to serve these media files. This issue aims to bring attention to the absence of this particular feature in Soul.

IanMayo commented 4 months ago

Hello @faisalsiddique4400 , I'm pretty sure my team has implemented a working instance of this using _extensions, without requiring any changes to soul-cli. We're serving a compiled react-admin app as static html content from a soul-cli instance.

If the compiled app is loaded into the dist sub-folder of a Soul-cli instance, it can be server from the root url using a Soul extension like this: image

thevahidal commented 2 weeks ago

Hi @faisalsiddique4400, @AbegaM is working on a new PR about how to serve static files over Soul. Check out #208 for instructions.