akf-forum/util/reset.js

9 lines
281 B
JavaScript
Raw Normal View History

2022-04-06 21:14:46 +03:00
const mongoose = require("mongoose");
require("dotenv").config();
2022-04-06 21:14:46 +03:00
mongoose.connect(process.env.MONGO_DB_URL, () => console.log("Database is connected"));
2023-05-25 17:47:54 +03:00
const Models = require("../src/models");
2022-03-13 16:16:46 +03:00
2022-09-17 15:19:41 +03:00
Object.values(Models).forEach(model => model.collection.drop().then(console.log));