Best way to seed initial users/admin ?

37 views
Skip to first unread message

Kadhiresan K

unread,
Aug 31, 2016, 9:27:26 AM8/31/16
to sails.js
Hi, What is the proper way to seed the database with an initial admin user(while 1st setup/installation). if no user admin user exit in user table(DB).
For now i am using
config/bootstrap.js for create the user just BEFORE the callback cb(). Wondering is it correct way to approach..?

Cory Robinson

unread,
Aug 31, 2016, 11:35:51 AM8/31/16
to Kadhiresan K, sails.js
I use findOrCreate in bootstrap.js - has been working great for me!
Reply all
Reply to author
Forward
0 new messages