When creating a new adonis project you will have a single
/start/routes.js file in which you could have all your Routes. But I think this is not an optimized way to handle Routes.
Consider a situation when you will create dozens of different routes: users, posts, links, customers, etc, ect. Even using
will not solve the problem.
Solution is simple -> create
routes folder with
index.js file in it:
with required(“…”) in
Example of addresses route:
On each route creating you will create a separate file. Simple and effective 😉
AdonisJs. Beginner’s Guide
AdonisJs fullstack-app, deploy to Heroku, database, migrations, authentication, testing, validation and more.
AdonisJs. Named Middlewares with passing props
Making life o lot easier by reducing copy-pasting logic using named Middleware
AdonisJs. Implementing Seeds and Factories with log to a file
Did you know that after creating tables in your database you can easily fill it with fake data? It can be done in a…