bulletproof-nodejs icon indicating copy to clipboard operation
bulletproof-nodejs copied to clipboard

Add DB Docker Setup, Review Readme, Review Auth Function

Open marcoscannabrava opened this issue 4 years ago • 4 comments

  • Easy DB setup with Docker
  • Revised Auth
  • Commented out Mailgun to make contributions easier (no need for paid API keys)
  • Change NPM for Yarn

Just a suggestion. The goal of this PR is to make it easier for new contributors to write the first few tests which I think is the most important next step.

interesting architecture, congrats

marcoscannabrava avatar Jul 24 '20 21:07 marcoscannabrava

Thanks, looks good.

If you don't have MongoDB installed and running, install Docker and docker-compose and run:

But not everybody uses docker and is easier to just install Mongo.

Also changing npm to yarn adds another dependency, because you'll need to have yarn first installed to run the project.

I think those things should be optional, but I'll let the community decide whats best.

santiq avatar Jul 28 '20 00:07 santiq

Added a comment at a line that confused me. Not sure if I didn't understand the flow or it is a valid concern.

The docker-compose file personally will help me but as Santiq said, it is not widely used and will add an additional learning curve to this repository. Small sized teams looking for a suitable architecture to start off with may skip using Docker. Is there a way to make running the project with Docker optional?

Also in the Roadmap, can you add a tick to "Add agenda dashboard" bullet point as that is available.

varunagarwal315 avatar Jul 29 '20 06:07 varunagarwal315

Is there a way to make running the project with Docker optional?

Because you can pass in a .env file to docker (and it gets put in env. variables), it would be possible to check if the env variables are set. If they arent already set, load from .env file. If they are, dont do anything.

theS1LV3R avatar Sep 22 '20 10:09 theS1LV3R

@ent3r I believe it's optional the way it is and the docker solution just simplifies things for some people. You either:

  1. run docker-compose up (this assumes you have docker installed) OR
  2. run mongoDB & run a DB mgmt tool as services in your machine (this assumes you have mongoDB & a DB mgmt tool installed)

marcoscannabrava avatar Sep 22 '20 11:09 marcoscannabrava