ctaylo21 / termy-the-terminal

Web-based terminal powered by React
MIT License
45 stars 2 forks source link

Server Side Processing - Question #45

Closed nicpenning closed 8 months ago

nicpenning commented 10 months ago

What is your recommendation for doing server side processing of custom commands and directories? The idea is that I can use a command and check a database to see if it exists before executing it. I am trying to avoid having commands in the backend and the frontend.

Thoughts?

ctaylo21 commented 8 months ago

Sorry about the delay here - I haven't touched this project in a while. I think it should be pretty straightforward to add a server-side component. All of the commands already use Promises. You can just make a command like the existing ones but replace client logic with an API/DB call and resolve with the result.