Closed Nhacsam closed 9 years ago
What is the problem then?
What if you need angular for front and expressjs for the back ? You will make 2 npm install in the main folder and the server folder ? With 2 packages.json ?
Other oroblem, if you will tell in the root packages.json (the front one) that's the application main js is in server/app/app.js, how to get the index.html ? If not, how to run the server ? ...
Sorry that's not something I'm very familliar with but I don't see the problem with 2 npm install and can't they use the same package.json?
I don't see either what is the problem with having the path to the HTML file...
Sorry for my noob-itude :)
Try ti push it or heroku and make both work ;)
Or you can just explain it to me
You cant have two url with : GET / Which get the index.html without passing by the server GET /api/player Which will pass by the server to compute the result
The GET / must pass by the node serveur which will return the index.html file. The best way to do that is to have the index.html in a sub dir of the server root directory
Hey I think we don't have the prerequisites to fully understand this level of discussion. Can we start again from the basics?
Like: Nhacsam, what are the advantage of having a build system? What are Grunt and Gulp? Do we really need them for our project or do you just think it's interesting for us to know about? Can we combine that with a template engine (like Jade)? Does this system imply pages are generated at server boot, and then clients have to query the server asynchronously to get the dynamic content? What are the advantages of this technique versus serving dynamic pages?
I agree that the current file structure is not suitable from a package.json/dependencies point of view. Just be aware that we did not really think of it beforehand, and that it's cool someone like you offers help on that point.
I do not understand your last comment, and I believe it all depends on the framework/communication model we use. But "without passing by the server" does not really make sense. I assume it means "GET / returns a static file", and "GET /api/player asks the server to do come computations before returning a result". This looks like a RESTful model, right?
Yeah, lots of questions...
I will answer to all your questions with some propositions and maybe a skype today or tonight.
Just 2 little questions to prepare my propositions :
"Today or Tonight?" WHY NOT BOTH
BOTH! Thx Nhacsam for the skype Tech Talk proposal! Didn't mean to waste your time. I'll try to be available on skype from 11pm (your timezone). Works for you?
Yeah, maybe we will begin without you ^^
Issue closed then?
I think we will have problems with the file structure and heroku. We need to manage all the application dependency with the same
pakages.json
in the root directory. I propose this kind of structure :