Re: Structure of a web project

2020-06-17 Thread federico3
I usually place HTML templates in "templates/.tmpl" See [https://nim-lang.org/docs/filters.html#available-filters-stdtmpl-filter](https://nim-lang.org/docs/filters.html#available-filters-stdtmpl-filter)

Re: Structure of a web project

2020-06-16 Thread jasonprogrammer
I've been working on a project lately with Jester, and have a src/ directory for Nim source and web/ directory for JS, CSS, etc: [https://github.com/jasonprogrammer/gerbil](https://github.com/jasonprogrammer/gerbil)

Re: Structure of a web project

2020-06-02 Thread jackhftang
IMO, there is no need to think too much on the file organization, you will find how to organize them when the code size grow. One little trick I found useful is to add a --path to nim.cfg and create a common.nim that export frequently used packages. So that I can easily import packages with impo

Re: Structure of a web project

2020-06-02 Thread Ingon
Just realized that the forum actually shares code, but the shared code is defined in the `frontend` module and imported by the main/root module. Maybe this is a possible answer, but doesn't seem completely intuitive to me.

Structure of a web project

2020-06-02 Thread Ingon
I'm looking for ways/best practices on how to structure a dynamic web site I'm planning to do with nim. Looks like I'll be using `jester` for the backend, with `karax` for the frontend. Ideally they would live in the same repo and share some of the code, for instance the types. So, I'm looking f