2019-08-12 15:35:40 +02:00

26 lines
575 B
JavaScript

'use strict';
/**
* An asynchronous bootstrap function that runs before
* your application gets started.
*
* This gives you an opportunity to set up your data model,
* run jobs, or perform some special logic.
*/
module.exports = async () => {
const pluginStore = strapi.store({
environment: '',
type: 'core',
});
if (!(await pluginStore.get({ key: 'application' }))) {
const value = {
name: 'Default Application',
description: 'This API is going to be awesome!',
};
await pluginStore.set({ key: 'application', value });
}
};