Open scott-s-douglas opened 7 years ago
@scott-s-douglas these are the questions I have for you, not having made any production apps in Node before:
What stack does a production Node app usually run on? For example, I usually use Django on Python 2.7 using Postgres for DB, and Gunicorn for a WSGI server for serving the application. I remember hearing things about Express but I'm not sure what it does. If you could clarify this, that would be excellent.
Hand-in-hand with number 1, what DB does the SWAPR server run on?
Ideally, in a production environment, how should the client be served? If just serving the application as static HTML is fine, I can do that with a web server like nginx, and we can just host the backend on a separate endpoint of some sort (maybe /api/ or something).
What other prereqs can you think of that I'm not listing below? Anything helps. The system-wide prereqs will be hardcoded into the provisioning playbooks, whereas the application-local stuff will be automatically updated on each "deploy" or update, so for updating Node packages for example, I'll just make sure to run an npm install
on each provision/deploy.
Known System-wide Prereqs:
Known Application-local Prereqs:
Express
is a web server written in node, so it gets installed by npm, we'll want to proxy requests to it using nginx
as that will be better for serving the static assets and doing httpssqlite
for dev purposes, we'll eventually want to be able to swap in something more scalable for production usenginx
with a reverse proxy for the /api/
path@scott-s-douglas
Here's the rest of what I need (I think) from the...
Client dev team:
dist
folder.Backend dev team:
host: 127.0.0.1 / port: 5432 / user: swapr / pass: change_me_and_reprovision_everyone_later / db: swapr_prod
This comment is a work in progress if I find anything else wrong. You can now see the mocked data live at http://swapr.vip.gatech.edu/
Also tasks for next semester, but we may want to contact OIT about getting SSL certificates to secure the SWAPR interface before we do anything live on it.
For the db connection you should be able to set an environment variable DATABASE_URL
like postgres://swapr:change_me_and_reprovision_everyone_later@localhost:5432/swapr_prod
Investigate using vagrant to virtualizeour dev environment for this repo—macOS, Windows, and Linux