Skip to content
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

Live Refresh #12

Open
Fleury14 opened this issue Jan 24, 2023 · 0 comments · May be fixed by Soleras3/react-challenge-project-jan-2023#12
Open

Live Refresh #12

Fleury14 opened this issue Jan 24, 2023 · 0 comments · May be fixed by Soleras3/react-challenge-project-jan-2023#12

Comments

@Fleury14
Copy link
Collaborator

This feature request is on the difficult side and is considered "extra credit". It is intended for advanced developers to demonstrate how they would tackle a more difficult problem.

Current Functionality

The current app only displays orders when a fetch is specifically called from the application. If someone adds/deletes/edits orders in the database through a method other than the app (such as Postman), the app does not reflect any changes in the order.

Desired functionality

In a real world application, an app like this would likely be deployed in several different locations that share the same database. For example a cashier would enter in an order and then this order would display on a make line for the cooks to make.

An endpoint has been created to simulate this sort of functionality on the server end. Hitting the /live-mode endpoint with a POST request triggers an operation on the server where orders are added and deleted at regular intervals. This interval can be specified by including { time: x } in the request body where x is the number of seconds. If no time is specified, the interval between orders is 5 seconds.

The desired functionality is to have these orders display on the front end as they are being added/deleted on the back end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant