Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DB Docker Setup, Review Readme, Review Auth Function #78

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

marcoscannabrava
Copy link

  • 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

@santiq
Copy link
Owner

santiq commented Jul 28, 2020

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.

isAuthenticated: true,
user,
}
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be an else to catch if the user does not/ no longer exists. We are getting a jwt that is signed but with an id that is no longer in the system. The other block where isAuthenticated: false will not be called since that is in the else statement for the check for headers.

Also the catch block for detecting an invalid token should be handled as well? Maybe return a direct error to the user?

@varunagarwal315
Copy link

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.

@theS1LV3R
Copy link
Contributor

theS1LV3R commented Sep 22, 2020

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.

@marcoscannabrava
Copy link
Author

@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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants