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

[Story] - Serve JSON file into a prod environment #61

Closed
3 tasks done
juanpb96 opened this issue Apr 8, 2024 · 1 comment · Fixed by #63
Closed
3 tasks done

[Story] - Serve JSON file into a prod environment #61

juanpb96 opened this issue Apr 8, 2024 · 1 comment · Fixed by #63
Assignees

Comments

@juanpb96
Copy link
Owner

juanpb96 commented Apr 8, 2024

Description

Currently, json-server is being used to make local development based on API communication. The goal is to understand how to "deploy" or access this data from anywhere to prevent issues on the deployed site in the future

Tasks

  • Deploy JSON file to a prod environment
  • Test "Destinations" page behavior
  • Address error scenario where the data is not accessible

Notes

  • Currently, an error is showing on Chromatic and mobile when deploying the site and using the --host option. This should be fixed to prevent ugly errors in both cases.
  • By creating a backend project, it is a good idea to handle routing from the server to avoid using the hash.
  • As the data will not change periodically, it will be helpful to implement a basic cache strategy or conditional fetching.
@juanpb96 juanpb96 self-assigned this Apr 8, 2024
@juanpb96
Copy link
Owner Author

According to this thread, the only solution for running a JSON server is by downgrading the package to a specific version such as the @0.17.1. Reference: typicode/json-server#1500

@juanpb96 juanpb96 linked a pull request Apr 21, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant