Seed-Script
SeedScript is used to populate the default data into the database that api-server will be using .The main objective of seedScript is use create admin credentails so that the adminDashboard can be configured .
admin Seed script
- File Path: Script/admin.js
Description: This is a use to create the default admin in the database.The default admin credentials that is 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 admin also .
*Limitations: Make sure you use different email Id in case you wish to create multiple admins.
appConfig Seed script
- File Path: Script/appConfig.js
Description: This is a use to create the default appConfig in the database.The default appConfig details is used by your mobileApp initially on the load.
If you wish to change the default credentails you need to change it from adminDashboard and configure as per your need .
Step to run seed-Script
Go to the api-server and run
npm run-script seed
This will execute the admin.js and the appConfig.js file and seed the default data into the dataBase .
- Make sure you set the NODE_ENV before seeding the database in case of production .