4 ms·
Awesome! I have been looking for some best practices for merging all of these toolsets. One thing that continues to escape me, however, is building a succinct d
by swalkergibson 15y ago
Awesome! I have been looking for some best practices for merging all of these toolsets. One thing that continues to escape me, however, is building a succinct directory structure for JS applications? I cannot seem to wrap my mind around the exports idea...
- gelnior 15y agoYes, I had the same problem. Ponyo (example application) code on github can give you some hints, I tried to make things clean and as light as possible. https://github.com/gelnior/ponyo https://github.com/gelnior/ponyo For client-only JS applications, have a look at Brunch framework. It is really good to structure your app (Ponyo client side is based on it). http://brunch.io/ http://brunch.io/
- Skywing 15y agoHave you explored the base web application that express will create for you? If you just run the command "express foo", it'll create a starting point for you to look at. I usually create additional directories and .js files inside of the routes directory. I use them for name spacing and organizing my files pretty much. Then, in the index.js file I export them, so you end up with something like routes.auth.signin, routes.auth.signup, etc.