]>
git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - scripts/danger/clean/cleaner.js
1 const rimraf
= require('rimraf')
3 const constants
= require('../../../server/initializers/constants')
4 const db
= require('../../../server/initializers/database')
6 db
.init(true, function () {
7 db
.sequelize
.drop().asCallback(function (err
) {
10 console
.info('Tables of %s deleted.', db
.sequelize
.config
.database
)
12 const STORAGE
= constants
.CONFIG
.STORAGE
13 Object
.keys(STORAGE
).forEach(function (storage
) {
14 const storageDir
= STORAGE
[storage
]
16 rimraf(storageDir
, function (err
) {
19 console
.info('Deleting %s.', storageDir
)