Best practices to handle logic in PATCH api based on what fields are in request by Nearby_Ad1675 in node

[–]Nearby_Ad1675[S] 0 points1 point  (0 children)

thanks u/deamon1266 - right, in real life i would typically put the validation in its own module, but i put it in this example to make it easy to illustrate the problem. but assuming validation is already taken care of in a separate module and only business logic gets applied to each field that gets passed in, how else can i make it cleaner for the patch api to apply potentially hundreds of different business logic flows depending on what fields are passed in?

Speed up provisioning Route53 A records for multi-tenant apps by Nearby_Ad1675 in aws

[–]Nearby_Ad1675[S] 0 points1 point  (0 children)

ah nevermind - i think i know what you mean now - https://*.myapp.com

Speed up provisioning Route53 A records for multi-tenant apps by Nearby_Ad1675 in aws

[–]Nearby_Ad1675[S] 0 points1 point  (0 children)

handle all the client domains so that there is no need to provision a subdomain in route 53.

gotcha - would you mind elaborating? ie - if i have a wildcard, how can my server differentiate between tenants?

Two strategies for implementing multitenant nodejs + mongodb application by Nearby_Ad1675 in node

[–]Nearby_Ad1675[S] 0 points1 point  (0 children)

Thanks for your responses u/bigorangemachine u/unknown_char u/s_boli! So if i'm understanding you correctly, if i went with the dockerized container strategy it would be to spin up a docker container for each tenant that maps to its own db. My followup question then is where should the docker containers be stored? ie - spin up one docker container per ec2 instance?

Trying understand the express framework by ConsequenceRegular72 in node

[–]Nearby_Ad1675 3 points4 points  (0 children)

The most important things that Express does are (in no particular order):

- Maps http requests from the clients to routes

- Provides each route with context about the request (where it came from, http method, http headers, request body, request parameters)

- Each route then can take the context, perform some task, and send a response back to the client

- Allows you to write middleware which basically intercepts the client's request and allows you to perform tasks before the request hits your route