Skip to content

Setting Things Up

tks18 edited this page Dec 4, 2020 · 23 revisions

1. Get Google Drive API Client ID, Client Secret, Folder ID and Refresh Token:

NOTICE: Some education mailboxes may not be able to open the API. This is because the administrator does not have open permissions. You can use your own account to create the API.

  • Enable Google Drive API for Your Account:

    • Here is the Link to Enable Drive API - Click Here

    • If You Have not Created any Project in Google Developer Console or if This is Your First Time Setup, It will Ask You to Create a New Project.

    • After Creating a New Project Enable the Drive Api.

Enable Drive API

  • Create an OAuth client ID:

    • The first creation will allow you to configure the consent screen, fill in the application name and save it directly.

    Create OAuth Client ID

    • Select Desktop app (It may change when you visit here, please hit and try!)

    • Then you can see the client ID (client_id) and client secret (client_secret), copy and save it.

    Created Client

  • Get refresh_token

    • Install Rclone

    • Enter the rclone config command, the following message will appear, please follow as shown.

    Rclone Config Rclone Config 2

    • In the browser, you may encounter the prompt in the figure below, this is because the API was created by us and has not been verified by Google.

    Rclone Config 3

  • Get root directory ID (root)

    • The root directory here refers to the root directory displayed by G-Index, which can be any directory in your network disk. Open the network disk to locate a directory or shared directory, the code at the end of the URL in the address bar is the directory ID. If the personal network disk parameter is left blank, it is the root directory of the network disk.
    Example: https://drive.google.com/drive/u/1/folders/###########XYZ
    

2. Create a Cloudflare Account

Click Here to Create a Cloudflare Account

3. Create a Heroku account

Click Here to create a Heroku Account

4. Create a Mail Account

  • Click here for all the Available Providers.

  • Create a Account in any of the Above Mail Providers.

  • We need its SMTP Configuration, for that google search by MAIL-PROVIDER-NAME smtp config for getting its SMTP Configuration. We need the Following Configs:

    • SMTP Address
    • Port Number
    • Your username / emailid
    • Your email Password

5. Create a Mongodb account

  • Click here for Creating a MongoDB Account, with which we will be Hosting the Database for Our website for Storing User Information and Security Stuffs.

6. Setup Your Mongo Database

  • After Creating a Mongodb Account, create a new cluster in Atlas with default settings.

Mongodb Clust

  • Click on connect.

  • Put 0.0.0.0 in IP and create a admin user and remember the password it will be used in next step.

  • On next step, choose Connect your application and then following screen will come:

Mongodb Clust

  • Here node.js version can be any and hence in my case I selected 2.2.12 or later as it was working smooth on local setup.

  • Copy the connection string

Mongo Connect

  • Change 2 parameters here, with the password you entered in previous step and with any name you like for example myusers

  • Do not use special characters in dbname!

  • remove <> and replace all the stuff with your input.

Mongodb Setup

  • Take note of the Connection String after making the Above Changes, this will be used to setup Backend Environment Variables.

It Looks like You have Completed all the Setting Ups Required for Deploying this G-Index. Now You Have Two Ways for Deploying the Backend which is as Follows. Select Whichever that is Easy for You.

  • Method 1 - Using My Cli Deployer Tool - Click Here
  • Method 2 - Using Git and Heroku CLI - Click Here



Go Back
Go to Next Page

Clone this wiki locally