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

[FEATURE] Api prefix #16

Merged
merged 1 commit into from
Aug 30, 2018
Merged

[FEATURE] Api prefix #16

merged 1 commit into from
Aug 30, 2018

Conversation

olavoasantos
Copy link
Owner

Description

Currently, the app registers all routes without prefixes, yielding in endpoints such as localhost:3000/users. For further customization, a configuration option should be added which sets a prefix to all endpoints.

Solution

Defined api.prefix to the configurations.

Proposed API

const faux = require('faux-call');

faux.config.set('api.prefix', '/api'); // e.g. localhost:3000/api/users

Issue

Resolves #6

Release

@olavoasantos olavoasantos added feature New feature done labels Aug 30, 2018
@olavoasantos olavoasantos self-assigned this Aug 30, 2018
@olavoasantos olavoasantos changed the base branch from master to rt/version-0.2.0 August 30, 2018 21:25
@olavoasantos olavoasantos merged commit ecb5405 into rt/version-0.2.0 Aug 30, 2018
olavoasantos added a commit that referenced this pull request Aug 31, 2018
* refactored response files into separate files

* adds the hability to define custom routes through the faux object (#14)

* added api.prefix to the config and added prefix to routes (#16)

* added relationship routes

* added relationship routes (#17)

* removed unecessary Faux.js file

* removed test file

* removed test file

* fixed unparsed id on hasMany delete route
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
done feature New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant