- Sign In
- Sign Up,
- Reset Password
- Update Profile
- Update Password
- Update Email
- Update User Avatar
- Delete Profile
- Reset Password by E-mail
- Verification Profile by E-mail
- Signed Out Access Token blacklisting by Redis
- Image Upload (public storage, Many-to-many relationships)
- Multi language by i18Next
- E-mail notifications
Download Redis for Windows from the official website.
Mac (using homebrew):
brew install redis
Linux:
sudo apt-get install redis-server
After installing MongoDB, the next step is to set up a single node replication. This is needed because certain features such as change streams (which we need for our Node.js application to interact with MongoDB) are only available in MongoDB's replica set configurations.
Please follow these steps:
-
Download MongoDB:
Download the MongoDB Community Server from the MongoDB official download page. Choose the version suitable for your Windows operating system and download the .msi file.
-
Install MongoDB:
Run the .msi installer and follow the setup wizard. install it as a service
-
Find and edit the MongoDB configuration file
The MongoDB configuration file,
mongod.cfg
, is typically located in the\bin
directory of your MongoDB installation path. For example, it might be in a directory likeC:\Program Files\MongoDB\Server\6.3\bin
. Navigate to this directory and openmongod.cfg
in a text editor of your choice. -
Add the replication settings
In the
mongod.cfg
file, you'll need to add a section for replication. If it doesn't exist, add the following lines to the end of your file:replication: replSetName: 'rs0'
Here,
rs0
is the name of the replica set. You can replace this with a name of your choice. -
Restart MongoDB service
After saving your changes, you need to restart the MongoDB service for the changes to take effect. You can do this from the Services management console in Windows, or from the command line:
net stop MongoDB net start MongoDB
-
Initiate the replica set
Next, you need to connect to your MongoDB instance and initiate the replica set. You can do this with the
mongosh
shell:mongosh
( if mongosh is an invalid command, follow this link on a guide to install it here ) This will open the MongoDB shell. In the shell, enter the following commands:
rs.initiate()
After running the
rs.initiate()
command, you should see a message indicating that the replica set has been successfully initiated.
Now, your MongoDB instance is running as a single node replica set, and you can use features such as change streams.
Please, continue with your project setup as described in the previous steps of this guide.
You can install Node modules using either npm or npm, which are both package managers for Node.js.
npm install # or npm install
COPY .env.example to .env
cp .env.example .env
npm start
npm run watch:win
npm run build
npm run lint
npm run prettier # or npm run prettier
npm run prettier:write # or npm run prettier:write - with prefix --fix