UI support for products!
This commit is contained in:
parent
013202546b
commit
29f4983a15
18 changed files with 21172 additions and 20 deletions
19
backend/init.js
Normal file
19
backend/init.js
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
const user = require("./dist/app/models/User").default;
|
||||
const mongoose = require('mongoose');
|
||||
|
||||
const init = async () => {
|
||||
await mongoose.connect(
|
||||
`mongodb://${process.env.MONGO_URI}/${process.env.MONGO_COLLECTION}`,
|
||||
{ autoIndex: true }
|
||||
);
|
||||
|
||||
await user.updateOne({ email: 'stovallj1995@gmail.com' }, { $set: { admin: true } });
|
||||
|
||||
// const u = new user();
|
||||
// u.email = "stovallj1995@gmail.com";
|
||||
// u.password = u.hashPassword("hotdog123");
|
||||
// u.isEmailValidated = true;
|
||||
// await u.save();
|
||||
};
|
||||
|
||||
init().then(process.exit);
|
||||
Loading…
Reference in a new issue