Ready to get started?

Join Adocasts Plus for $8/mo, or sign into an existing Adocasts Plus account, to get access to all of our lessons.

robot mascot smiling

Splitting Our Routes Between Auth & Web

@tomgobich
Published by
@tomgobich
In This Lesson

We'll split our routes into two files: auth and web. Our auth routes file will contain all our authentication-based route definitions and our web routes will contain the remaining.

Chapters

00:00 - Our Plan of Attack & Why We're Doing It
00:43 - Splitting Out Our Auth Routes
01:10 - Splitting Out Our Web Routes
02:30 - Updating Our AdonisRC Preloaded Files
03:55 - Disabling Linting & Prettier On Route Definitions

Join the Discussion 4 comments

Create a free account to join in on the discussion
  1. @nathan-reyes

    I think that prettier-ignore-start only works for markdown files, as discussed in this issue (https://github.com/prettier/prettier/issues/5287). I'm not sure how you were able to disable prettier for your routes files, so I just added start/routes/**/*.ts to my .prettierignore.

    1
    1. Responding to nathan-reyes
      @tomgobich

      Hi Nathan! Huh - yeah it sure does. 🤔

      Oh snap, looks like I disabled Prettier formatting on save for TypeScript files at some point. So, Prettier just isn't running for me unless I paste or explicitly format, sorry about that! Your solution does look to be the recommended approach. I'm going to have to re-enable Prettier and add that myself. Thank you for sharing!!

      1
  2. @tigerwolf974

    Hi, thank you for this content.
    Unfortunately , subtitles are wrong and correspond to the previous video.

    1
    1. Responding to tigerwolf974
      @tomgobich

      Terribly sorry about that, tigerwolf! The subtitles for this lesson have now been corrected. Thank you very much for the heads up!

      0