meteor-rest
meteor-rest copied to clipboard
re #106 - config for customizing paths
re #106 - config for customizing paths
SimpleRest._config = {
urlTransform: (type, name) => {
if (type === 'method') return `${SimpleRest._config.methodUrlPrefix}${name}`,
if (type === 'publications') return `${SimpleRest._config.publicationUrlPrefix}${name}`,
throw new Meteor.Error(404, `Unkown REST type: ${type} name: ${name}`);
},
methodUrlPrefix: 'methods/',
publicationUrlPrefix: 'publications/',
};
Hey I'm currently on vacation so I'll only be able to look at this a week from now. Sorry!
yeah - no problem - enjoy the beach (or whatever)
Any update on this, or the other PRs on this repo?
sidenote
I think this is a great addition to Meteor, and should be considered almost a requirement, allowing Meteor devs to to expose meteor methods and other functionality via REST api... I'd love to see a simple GraphQL stack on top of this, perhaps with this https://github.com/kuip/meteor-schema-graphql-bridge