Closed ryyan closed 9 years ago
Largely an architectural and project organization decision, but will web assets be served by the go server itself or will both the go server and asset server (apache, nginx, blah) sit behind a reverse proxy that correctly forwards requests to either?
The latter is a much more flexible architecture where outward facing apis can be split out and specialized based on user agent (browser vs mobile) while backed by a common api server that provides data or takes care of other common business logic like session management and authorization.
If this path were taken, it would probably be simplest to have a script that launches each project where the web/mobile apps accept an api server endpoint. If needed, a web api server can serve web assets from a configured fs directory on a special route path (Iike /assets/index.html, /assets/login.html, etc).
It does, however, come with its complications like the need for a real network architecture and its not clear to me what the scope/seriousness/intended lifespan of this project is.
Good points to keep in mind. Let's start with the quickest option and use the Go server to also serve up the static client files.
Need a script that compiles and serves both the frontend and backend files with one push.