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

Consider renaming src directory to client #511

Closed
richb-hanover opened this issue Aug 28, 2016 · 4 comments
Closed

Consider renaming src directory to client #511

richb-hanover opened this issue Aug 28, 2016 · 4 comments

Comments

@richb-hanover
Copy link

richb-hanover commented Aug 28, 2016

I realize that this train may have left the station/horse out of the barn/etc. but...

Would you consider renaming the src directory to be the client directory? Or allowing client to alias to src?

The major reason I want this is that I immediately needed to create a server directory to handle the proxied queries (thanks for shipping 0.2.3!), and now my project has two major folders: server and the not-quite-complementarily-named src.

Not a big deal, I can clearly live with it. But you're doing great work for the React/Javascript/etc. beginner's ecosystem, so this would make things a bit easier for newbies...

@lacker
Copy link
Contributor

lacker commented Aug 28, 2016

I think this horse is out of the barn and well on its way into the next county. Are you sharing code between client and server? If so, you might just want to put your server code inside src. But if you're not sharing code between client and server, you might just want your server code to go in a separate directory entirely, rather than being a subdirectory of your create-react-app app.

@steida
Copy link

steida commented Aug 28, 2016

I can only recommend this structure https://github.com/este/este/tree/master/src It would open a lot of possibilities.

@richb-hanover
Copy link
Author

Two useful suggestions. Consider my proposal withdrawn. Thanks!

@marienfressinaud
Copy link

I actually have a similar problem: my backend is written in Go and frontend has been created with create-react-app and both are in the same repository. It makes me uncomfortable to have frontend in a src folder since it could contain backend too… which is not the case.

My actual folders' structure is the following:

- [Go-specific files]
- ./client
    - ./src
    - package.json
    - index.html

Problem is when deploying on Heroku for instance, it does not detect my package.json file so I had to write a small script which package the app on my PC and push all of that on Heroku. It's working but it could be a bit more elegant :).

I know it's a quite specific problem so I don't ask to reconsider this issue, but do you have an already-working and more elegant solution?

@lock lock bot locked and limited conversation to collaborators Jan 22, 2019
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

4 participants