yogiben / meteor-admin

A complete admin dashboard solution
https://atmospherejs.com/yogiben/admin
GNU General Public License v3.0
827 stars 261 forks source link

[QUESTION] Where do you add the AdminConfig ? #381

Open johhansantana opened 7 years ago

johhansantana commented 7 years ago

It's said that you need to add it both in client and server side, but where do I add this configuration?

AdminConfig = {
  adminEmails: ['ben@code2create.com'],
  collections:
    {
      Posts: {},
      Comments: {}
    }
}
Fotso commented 7 years ago

under the /lib directory

384

laurencefass commented 7 years ago

i couldnt see this updated today in the readme doc. quite useful info for someone just getting started...

laurencefass commented 7 years ago

inadequate documentation is generally an with software issue. why come to the issue queue to answer basic config questions?

laurencefass commented 7 years ago

why waste peoples valuable time with poorly documented software? based on the arrogant response and combined poor documentation i'm not going to bother testing this software further. what if i hit a more complex problem? more of the same? no thanks...

reda134 commented 6 years ago

@laurencefass I fully understand your disappointment, i also faced the same problem and i have now a bad feeling to this project. Did you find any alternative way to implement a meteor admin frontend ?

capi1O commented 5 years ago

option 1

from @Fotso https://github.com/yogiben/meteor-admin/issues/384#issuecomment-299458050

create a lib directory at root of your project and create a file AdminConfig.js with

AdminConfig =
{
    adminEmails: ['admin@website.com'], 
    collections:
    {
            Posts: {}
    }
};

inside.

option 2

From https://github.com/yogiben/meteor-admin/issues/77#issuecomment-70686682 :

in main/server.js : global.AdminConfig = AdminConfig; in main /client.js : window.AdminConfig = AdminConfig;

And AdminConfig can be defined in a shared/config.js :

export const AdminConfig =
{
    adminEmails: ['admin@website.com'], 
    collections:
    {
            Posts: {}
    }
};

and imported like so (in main.js server and client) : import { AdminConfig } from '/shared/config.js';

Note : I used server, client and shared folders because it is the structure of my app but it can be done differently (using Meteor.isClient()...).