@alexeypetrushin
A good set of goals is a good thing!
A website development tool that creates the content for two servers:
A front-end with:
1. a clean mix of single-page-apps for reading (think live reading with ajax
etc); each sub-app at a different URL for good bookmarking. Each sub app is a
single html file and JS file.
2. a CGI-style dynamic support system for typical post-act-redirect for
classical server-side security and vetting when creating new content. Each
function is encapsulated in a javascript file. (njs for NGINX Plus, fastcgi for
lightppd, etc.)
(Actually 1 and 2 could be on separate servers; perhaps that is wiser.)
An API-only server (serving the frontend-server) with:
1. A typical webserver proxied to a live nim webserver. Think NGINX fronting
a Nim Jester server.
2. This is the machine safely does the backend work with databases, etc.
All of this from one source code repo with exhaustive compile-time checking. If
the front-end javascript is written to call the backend api with the wrong
object format, a compile-time error is thrown. If the front-end HTML form is
written to send a POST to the front-end CGI with the wrong object format, a
compile-time error is thrown.
When the CI/CD pipeline for the repo generates a new version for production
release, both websites are updated (or could be updated if desired). Kubernetes
or AWS or etc handles details; but perhaps the opinionated generated provides
hints/details for the CI/CD pipeline as well.
Taken to the extreme, the goal is **compile-time type-checking and verification
".**
Later perhaps CSS could be pulled in. if the CSS "source code" has a ".class"
that does not match the compiled repo, a compiler error is thrown.
**fictionally as seen in the repos for the XYZ website***
source repo:
/web/index.nim
/web/foo.nim
/web/bar.nim
/web/commonmodels.nim
/web/bobsfancylib.nim
/web/addthatthing.nim
/web/deletethatotherthing.nim
/api/view.nim
/api/controllers.nim
/api/database.nim
/api/dbmodels/zing.nim
/api/dbmodels/bang.nim
Run
repo output for front-end:
/site/index.html
/site/index.js
/site/foo.html
/site/foo.js
/site/bar.html
/site/bar.js
/site/static/js/commonmodels.nim
/site/static/js/bobsfancylib.nim
/cgi/addthatthing.js
/cgi/deletethatotherthing.js
Run
repo output for api
/apisite/app/xyz
/apisite/conf/details.conf
Run