Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
johhansantana opened this issue Apr 7, 2017 · 6 comments
Open

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

johhansantana opened this issue Apr 7, 2017 · 6 comments

Comments

@johhansantana
Copy link

johhansantana commented Apr 7, 2017

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
Copy link

Fotso commented May 5, 2017

under the /lib directory
#384

@laurencefass
Copy link

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

@laurencefass
Copy link

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

@laurencefass
Copy link

laurencefass commented Jun 20, 2017

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
Copy link

reda134 commented Aug 16, 2018

@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
Copy link

capi1O commented Oct 15, 2018

option 1

from @Fotso #384 (comment)

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 #77 (comment) :

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()...).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants