Skip to content

Instantly share code, notes, and snippets.

@smoothdvd
smoothdvd / index.js
Created February 5, 2022 08:38
server/bootstrap/index.js
'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.
*/
const _ = require('lodash');
@smoothdvd
smoothdvd / index.js
Last active February 5, 2022 08:52
server/services/index.js
'use strict';
const jwt = require('@strapi/plugin-users-permissions/server/services/jwt');
const providers = require('./providers');
const user = require('@strapi/plugin-users-permissions/server/services/user');
const role = require('@strapi/plugin-users-permissions/server/services/role');
const usersPermissions = require('@strapi/plugin-users-permissions/server/services/users-permissions');
module.exports = {
jwt,
@smoothdvd
smoothdvd / providers.js
Last active February 5, 2022 08:47
server/services/providers.js
...
switch (provider) {
case 'our-provider': {
// 'our-provider' code here
break;
}
...
}
...
@smoothdvd
smoothdvd / index.js
Created February 5, 2022 08:51
server/bootstrap/index.js
...
const grantConfig = {
...,
'our-provider': {
// 'our-provider' configuration here
...
},
...
}
...