Seed Script

Seed Script is used to populate the default data into the database that ApolloServer will be using. The main objective of Seed Script is to create admin credentials so that the Admin Dashboard can be configured.

  • Note: Make sure you change the ENDPOINT PROJECT ID before running the seed script.

Admin Seed Script

  1. File Path: Dating-FullApp/ApiServer/script/index.js
  2. Description: This is used to create the default admin in the database. The default admin credentials that are populated into the database are:

     email: "[email protected]",
     password: "Password",
    

    If you wish to change the default credentails you need to change the user object in the above file path. You can use the same script to create multiple admins also.

    *Limitations: Make sure you use different email id in case you wish to create multiple admins.

Setting Seed script

  1. File Path: Dating-FullApp/ApiServer/script/index.js
  2. Description: This is used to create the default setting in the database. If you wish to change the default credentials, you need to change it from the Admin Web Dashboard and configure as per your need.

Steps to run Seed Script

  • Go to the ApiServer and run npm run-script seed

  • This will execute the admin and the setting seeds data into the database.

results matching ""

    No results matching ""