Skip to content
This repository has been archived by the owner on Jul 19, 2019. It is now read-only.

Remove comments.json from source control #59

Closed
yangmillstheory opened this issue Jul 12, 2015 · 2 comments
Closed

Remove comments.json from source control #59

yangmillstheory opened this issue Jul 12, 2015 · 2 comments

Comments

@yangmillstheory
Copy link

When playing with a local version of the demo, new comments modify comments.json, which are detected by git, and dirties the current index.

Could we add comments.json to the .gitignore, check if it exists when the app starts, and if not, create it with the existing content below?

[
    {
        "author": "Pete Hunt",
        "text": "Hey there!"
    }
]
@zpao
Copy link
Member

zpao commented Jul 13, 2015

I agree that it's a bit annoying. Back when we first did this repo, the original file was left untouched and then current state was left in memory. But we suggest in the tutorial that you can edit the JSON and see the changes in the browser so we made it read from disk on every request. Not ideal but it's a silly tutorial so it's not a huge deal.

What you suggest would be ok as well, except we'd need to do it in every server language. If somebody would like to take that on, I'd review it. Right now we have Node, PHP, Python, Ruby, Go, Lua (ls server.*)

The alternative is that we stop saying in the tutorial content that editing the JSON file is possible. That might be more reasonable (and reduce the dependency on complexity at the server level)

@zpao
Copy link
Member

zpao commented Sep 26, 2015

I'm just going to say we're not going to do anything about this anytime soon if ever, so closing out.

@zpao zpao closed this as completed Sep 26, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants