Skip to content

Welcome to The Diabetic way

For full Website content visit The Diabetic Way.



Part 3 Setting up a Atlas Account for Nightscout

1. Now Open another tab to make a Mongodb Atlas Account: See Here

and click Start Free



2. Enter your Account Details like I have and then click get started free



3. Atlas will send you an email, if you don't receive it check your Spam folder.

4. Now verify your email

5. Enter some information like I have below and then Finish

6. Select Create a cluster in Shared Clusters (FREE)

7. Leave all default values and click Create Cluster



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


9. Click on Allow Access from Anywhere



Allow Access Risks

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



Database Details Risk

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



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



12. Then click Create Database User.



Keep Safe

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 Which I will explain further down, on this process!
db user and db user password!

13. Click on Choose a Connection Method



14. Now Select Connect your application



15. Copy the Connection string click Copy icon and paste it somewhere to edit it later(like Notepad, or Notepad++).



Note! It should be similar to this - cluster0 (xxxxx) yours will be different

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

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


16. Make up a name for your database, this is not important information (just an example kdatabase ), note that default is myFirstDatabase

17. I will try to give you an example about the way to do this in the boxe's belows with my explanations on how to do it.

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

B. You also made a Database user Password so add your Password you created for your database in the box below, in the box on the left side removing mine I have put there to show you has an example!.

C. For the Cluster0 xxxxx where everyones 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 in to the last box, on the left side and click the Generate button which will then generate your Connection String Code, that you will need to add it in to your Heroku settings reveal Config Vars Mongo URI Section after you make it in the boxes below.



Note! Example Method for you to use! To make your Mongo URI Connection String

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 had your own details into the left side Boxes making sure to remove mine (click in the box's below, delete and put your own in place of mine!)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:


Now click on the Generate,below! And see the boxes generate your Connection String Code for you!





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


E. After you have generated your code, it should be looking somthing 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 explain and show you in the video below for you

My Connection String results

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

Warning

Keep this Connection String in a safe place, it is called your MONGODB_URI and you will need it for your Heroku Account Config Vars

The Diagram below, explains a little more on how to do it yourself.




video demo of getting connection string,



A. If you want to do it manually: replace 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:

Another example for you below!



Note!

There are no < and > characters in the final string, neither for password nor for the database name. You need to remove them!

You now need to add the Connection String you just made into your Heroku settings Reveal Config Vars.


Scroll down where you will need to edit the MONGODB_URI and past in your Connection String Code, and then restart all dynos.


Now we need to do


Part 4: Fork and Deploy cgm remote monitory

If you have any issues or concerns please visit:

Discord CGM in the Cloud ๐Ÿฉธ Nightscout Github AAPS


          Please Subscribe to our UTUBE Channel





Why Not take visit ๐Ÿšด๐Ÿปโ€โ™‚๏ธ UK Wide Cycle Ride - Diabetes.uk ๐Ÿšด๐Ÿฟโ€โ™€๏ธ or Diabetes.UK Swim22 ๐ŸŠ๐Ÿฟโ€โ™‚๏ธ or ๐Ÿšถ๐Ÿฟโ€โ™‚๏ธ Diabetes UK Month of Miles Challenge ๐Ÿƒโ€โ™€๏ธ for all of your Diabetes Needs!