You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This gist is the summary of a video on YouTube [in Arabic] you can watch from here: https://youtu.be/BTlL-LBDCSI
Rules to write a better commit message
These are my preferences for a good commit message, feel free to fork this gist and add your own standards, or add comment here to share yours with the community.
1. Include only the files related to the feature you are implementing:
Don't add any file that is not related to the main issue, you can make it in a separate commit.
Separating files that not related is important in the revert cases.
Revise the whole changes always before committing and make sure to mention each change you made in the message.
2. Commit subject should be concise and reflect the essence of the commit:
Imagine the commit as an Email to the owner or your team mates.
Subject in the first and main sentence of the commit, it should be concise and to the point.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Passport.js is a flexible authentication middleware (allowing users to log in) that can be fully customised and works great with connect/express.
It is flexible in the sense that it allows for different authentication strategies (think via Twitter, via our own user database - installed via separate modules that can be combined) and it allows us to specify any route or output during authentication.
DIFFERENT PARTS IN USING PASSPORT.JS
There are three main parts in using passport.js:
Requiring the module and using its passport.initialize() and passport.session() middleware with express.
Configuring passport with at least one Strategy and setting up passport's serializeUser and deserializeUser methods.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Error codes returned by the Backend Services RESTful API:
Error Code
HTTP Status Code
Error Message
Description
Returned By
1
500
Unexpected error.
All
Represents an error that doesn't fall into any other category.
107
General database error.
All
A problem occurred while working with the database. The error message will contain more information about the error.
107
400
The operation results in a duplicate key for a unique index.
Create
You are trying to create an item with a field that requires a unique value (for example: "Id"). The error shows that an item with such value already exists.
107
400
Duplicate values already exist for field Number of content type "New".
Update field
You are trying to enforce a uniqueness constraint on the values of a field but the field already contains non-unique values.
201
409
A user with the same username already exists.
Register user, Update user
The name of the user account you are creating or updating already exists.