mirror of
https://github.com/Akif9748/akf-forum.git
synced 2024-11-22 20:10:40 +03:00
14 lines
425 B
JavaScript
14 lines
425 B
JavaScript
const mongoose = require("mongoose");
|
|
mongoose.connect('mongodb://localhost:27017/akf-forum', () => console.log("Database is connected"));
|
|
|
|
const { SecretModel, UserModel, MessageModel, ThreadModel } = require("./models");
|
|
(async () => {
|
|
|
|
await UserModel.deleteMany({});
|
|
await ThreadModel.deleteMany({});
|
|
await MessageModel.deleteMany({});
|
|
await SecretModel.deleteMany({});
|
|
console.log("Success")
|
|
})();
|
|
|
|
|