Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

[BUG] settings.json does not reload #73

Closed
revsuine opened this issue Mar 20, 2024 · 1 comment
Closed

[BUG] settings.json does not reload #73

revsuine opened this issue Mar 20, 2024 · 1 comment
Assignees

Comments

@revsuine
Copy link

Describe The Bug

Hiya, firstly I'm not sure if this is a bug, I may just be doing something wrong, in which case I'd appreciate an explanation of how to do things correctly. I've done my best to read docs and search things up but I don't do web app dev so I don't really know what I'm doing other than following instructions.

Basically, I'm managing to get the startpage up at localhost:3000, but when I edit settings.json, the changes don't appear on the server, including when I restart the server with pm2 restart (also tried pm2 reload and pm2 delete followed by pm2 start again). I have also tried yarn dev and yarn start but those also seem to only use the config from before the server was started for the first time. I have also tried running yarn build again, to no avail.

I am able to type config edit in the startpage and paste my settings.json in there and it displays my settings as I would expect.

To Reproduce

Steps to reproduce the behavior:

  1. Clone https://github.com/excalith/excalith-start-page.git (or the ssh, I cloned the ssh)
  2. Follow the fork instructions on the wiki:
  3. In the directory of the cloned repo, rm -rf .github/workflows
  4. Install nodejs and yarn (for me, sudo pacman -S nodejs yarn)
  5. In the directory of the repo, type yarn to install all dependencies
  6. Change some things in settings.json prior to starting the server. For me, I changed the theme to Catppuccin Mocha and set my username.
  7. Run yarn dev and go to localhost:3000. See that the webpage currently reflects the state of settings.json.
  8. Ctrl C and then edit settings.json some more. For me, I changed the bookmarks to be the websites I like to use.
  9. Run yarn dev or yarn start or pm2 start "yarn start" (or pm2 start "yarn dev") and observe that the startpage appears as though settings.json was not changed since the first time you started the server
  10. To test, type config edit into the startpage and paste in your settings.json. Save and press esc, observe that your settings have now changes and the startpage reflects your settings.
  • However, note that this way of editing cannot update assets. I've put a wallpaper in the assets folder and am trying to access it in my config, but this wallpaper won't display until I've fixed this.

Expected Behavior

I am able to view a startpage that reflects the state of my settings.json file, either dynamically or by restarting the server or rebuilding.

Specs

  • OS: Arch Linux, no version because rolling release, I guess my kernel is 6.8.1-arch1-1 if that matters?
  • Browser: Firefox 124.0
@revsuine revsuine changed the title [BUG] [BUG] settings.json does not reload Mar 20, 2024
@excalith
Copy link
Owner

Hey @revsuine, thanks so much for the detailed explanation, it really helps to understand the way you prefer using, besides from diagnosing the issue.

The way you prefer using is the simplest way, which aims to inexperienced users to be able to edit their configs on the fly, or even deploy to their hosts without needing the source (in this case, settings.json file). For this reason, the only viable configuration option is to use config edit command to change your settings, or use config import command to import your configuration (ie. from your dotfiles) directly into the app.

I may look further into hot reloading stuff an option to bypass this functionality later, sounds a nice feature for more advanced users, but can't promise for this right now.

The preferred usage is through containers where you can mount those settings files into your dotfiles folder, so you will have absolute control over the settings, assets etc. directly synced with your dotfiles repository.

Please let me know what you think about it, and feel free to close the issue if it answers your problem.

PS: I used arch btw :D The requirement was there to see the OS only, just in case the Docker version creeps out on different platforms.

Repository owner locked and limited conversation to collaborators Mar 24, 2024
@excalith excalith converted this issue into discussion #75 Mar 24, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants