-
Notifications
You must be signed in to change notification settings - Fork 8
Cleanup Code #10
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
Cleanup Code #10
Conversation
| @@ -1,4 +1,3 @@ | |||
| MONGO_USER = "codeuino-user" | |||
| MONGO_PASSWORD = "thisisthewrongpassword" | |||
| DATABASE_URL="mongodb://<username>:<password>@cluster0-shard-00-00.t4hho.mongodb.net:27017,cluster0-shard-00-01.t4hho.mongodb.net:27017,cluster0-shard-00-02.t4hho.mongodb.net:27017/<dbname>?ssl=true&replicaSet=atlas-a80apd-shard-0&authSource=admin&retryWrites=true&w=majority" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might want to remove this URL as it will be different for every mongo cluster.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah! Basically it was just a placeholder to make it clear on what type of URL is expected
|
@vaibhavdaren @capedcrusader23 @AuraOfDivinity please review and merge if all good |
| MONGO_PASSWORD = "thisisthewrongpassword" | ||
| DATABASE_URL="mongodb://<username>:<password>@cluster0-shard-00-00.t4hho.mongodb.net:27017,cluster0-shard-00-01.t4hho.mongodb.net:27017,cluster0-shard-00-02.t4hho.mongodb.net:27017/<dbname>?ssl=true&replicaSet=atlas-a80apd-shard-0&authSource=admin&retryWrites=true&w=majority" | ||
| JWT_SECRET = "somesupersecretkey" | ||
| PORT=8000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| PORT=8000 | |
| PORT=8000 | |
| var bind = typeof port === 'string' | ||
| ? 'Pipe ' + port | ||
| : 'Port ' + port; | ||
| var bind = typeof port === "string" ? "Pipe " + port : "Port " + port; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check
| module.exports = { | ||
| messages: async (args, req) => { | ||
| if (!req.isAuth) { | ||
| throw new Error("Please login to continue"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
string in constants
Fixes #12
Included in this PR:
Working after this: