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

Rename the api file names #27

Closed
diegohaz opened this issue Oct 21, 2016 · 0 comments
Closed

Rename the api file names #27

diegohaz opened this issue Oct 21, 2016 · 0 comments
Milestone

Comments

@diegohaz
Copy link
Owner

diegohaz commented Oct 21, 2016

It should look more like:

api
├── user
│   ├── api.js
│   ├── api.test.js
│   ├── controller.js
│   ├── index.js
│   ├── model.js
│   └── model.test.js
└── index.js

Where api/user/api.js is the current api/user/user.router.js. I think it still makes sense while gives a better tree (since api comes alphabetically first).

The api/index.js file is the current routes.js file.

Also, this makes easier to change the endpoint names as one no longer needs to update the name of each file.

The api/user/index.js file should look like:

export api from './api'
export controller from './controller'
export model, { schema } from './model'
@diegohaz diegohaz added this to the v1.0.0 milestone Oct 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant