fbpx
Past Present Furture and Beyond

Past Present Furture and Beyond

T1 & T2 Cycling, Running Cycling, Events for all your empowering needs and good control of your diabetes management. Everybody else is also welcome on these rides! Take a look at our events that are happening around Lancashire.

Events

Welcome to The Diabetic way For full Website content visit Here

 Setting up Atlas Account Part 3


Setting up Atlas

Part 3 Setting up an Atlas Account for Nightscout

1. Now Open another tab to make a Mongodb Atlas Account: See Here and click Start Free
free Atlas Account

2. Enter your Account Details as I have and then click get started free 
setting up a free  Atlas Account


3. Atlas will send you an email, if you don't receive it check your Spam folder.
4. Now verify your email
verify your email
5. Enter some information as I have below and then Finish
welcome to Atlas
6. Select Create a cluster in Shared Clusters (FREE)
Shared Clusters (FREE)

7. Leave all default values and click Create Cluster
create shared clusters
Atlas will create your default cluster, wait until it is complete... (can take more than 3 minutes) If not sure after a while click on the leaf icon in the top left!

8. Click on CONNECT
click on connect

9. Click on Allow Access from Anywhere
Allow Access from Anywhere

Note!
If you don't allow access from anywhere (IP 0.0.0.0/0) Nightscout will not be able to access your database.!

10. Click on Add IP Address
Click on Add IP Address

Note!
Database Details: Make sure to not use your Atlas account Account details.
Do not use special characters: only letters and numbers. No spaces.

11. Add a database username (for example nightkai) and a database user password (in my examples below  Madeuppassword7) but please change it later, see both images below!!
Add database username and a database password

12. Then click Create Database User.
create database user

Note!
Make sure you write these details down in a safe place, you are going to need them later in the boxes below to make your Connection String!
db user and db user password!

13. Click on Choose a Connection Method
Choose a Connection Method

14. Now Select Connect your application
Select Connect your application

15. Copy the Connection string: click Copy icon and paste it somewhere to edit it later(like Notepad).
Select Connect your application

Note! It should be similar to this - cluster0 (xxxxx) will be different):
mongodb+srv://nightkai:This email address is being protected from spambots. You need JavaScript enabled to view it./myFirstDatabase?retryWrites=true&w=majority


16. Makeup a name for your database, this is not important information (example database ), note that the default is myFirstDatabase. Only letters and numbers, no spaces.

17. I will try to give you an example about the way to do it below:

A. In the boxes below 1st is your Atlas Account you gave yourself a User Name add it to the box below User Name on the left side!

B. Then you also made a Database user Password add your Password you created for your database add this too into the box on the left side.

C. For the Cluster0 xxxxx where everyone's will be unique when making a cluster when it is made so yours needs to be added into the Connection string part after it says Cluster0

D. And lastly you made up a Database Name, also add this to the last box on the left and click the Generate button which will generate your connection string code that you will need to add to your Heroku API

I have given you my examples below on the right side of the boxes so just ignore them they are my examples to show you how the connection string is made up!  You need to have your details into the left side Boxes making sure to remove (click here, delete and put your own!)first, and click on Generate.

username:  Eg: username:

Database password: Eg: Database password:

@cluster0:xxxxx  E.g: cluster0.xxxxx

Database Name:  E.g: Database Name:




mongodb+srv://  : @cluster0..mongodb.net/ ?retryWrites=true&w=majority

E. After you have generated it, yours should be looking for something similar to the one below. Mine might be a little different to what yours should be so do check it carefully, and make sure to copy and paste it into notepad like I will show you in the video below


My Connection String results

mongodb+srv://nightkai:This email address is being protected from spambots. You need JavaScript enabled to view it./kdatabase?retryWrites=true&w=majority


how to make connection string

Warning!
Keep this string safely aside somewhere, it is called your MONGODB_URI




video demo of getting connection string,



F) If you want to do it manually:

replace it 
with your database password as noted previously (in the example below Madeuppassword7 ) and by any text, you want to add as your database name, say kdatabase in my example. The result will be like this:
how to make connection string

Another example for you is below!
Connect to Cluster


Note!
There are no < and > characters in the final string, neither for a password nor for the database name.


Now we need to do

Part 4: Fork and Deploy cgm remote monitory


Diabetes UK
Why Not take a visit to
UK Wide Cycle Ride - Diabetes.uk or Swim22 - Diabetes.uk or Month of Miles
at Diabetes.uk
for all of your Diabetes Needs!

Cookie Notice

This site uses cookies to ensure the best experience. By continuing to use this website, you agree to their use. Learn more about our policy