-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement API to serve Playground CLI requests #727
Comments
Hey @lucifercr07 |
can I take this up? @lucifercr07 |
@Dev79844 assigned, thanks for contributing. Please let me know if any other details required. |
Sure we can collaborate together |
hey @Dev79844 i already wrote the API routes. we can collab. |
Hey @rishavvajpayee! |
sure @Dev79844 do let me know if i can help 👍 |
Closed as part of DiceDB/playground-mono#4 |
Description
DiceDB Playground is an interactive platform that allows users to experiment with DiceDB commands in a live environment, similar to the Go Playground. Users will be able to submit and execute commands directly through a web interface. The initial implementation will focus on enabling users to search for and trigger commands.
For more details about DiceDB playground you can check here.
We need to implement an HTTP service that handles CLI requests for the DiceDB Playground. The service will be responsible for parsing incoming HTTP requests at the
/cli
endpoint, executing the appropriate DiceDB commands, and returning the command responses in a structured format. The primary goal is to enable CLI-based interactions with DiceDB via the Playground interface.This service will:
QWATCH/QUNWATCH/ABORT/BGREWRITEAOF
these commands won't be supported as part of this.The API will follow the REST pattern and use the
POST
method to pass command information.Note: Implementation will be part of DiceDB playground backend repo.
API details
Endpoint:
POST https://<BACKEND_SERVER_URL>/cli/<COMMAND_NAME>
Request Body Format:
COMMAND_NAME
: The DiceDB command being triggered (e.g., SET, GET, HSET, etc.).KEY_NAME
: The key for the command.VALUE
: The value to be set or retrieved, depending on the command.Few example requests:
1. SET Command with NX Flag
URL:
POST https://<BACKEND_SERVER_URL>/cli/set
Body:
Response:
2. GET Command
URL:
POST https://<BACKEND_SERVER_URL>/cli/get
Body:
Response:
3. DEL Command
URL:
POST https://<BACKEND_SERVER_URL>/cli/del
Body:
Response:
Tasks
playground-backend
repository./cli
endpoint in the backend Golang server.key
,value
,COMMAND_NAME
) are provided.The text was updated successfully, but these errors were encountered: