← Back to Docs

Ignoring Certain Routes

Overview

Emtrey will automatically discover what routes to visit when not using a custom route config. In the case you have some routes you don’t want included in the process, you can specify them in the Emtrey config.

If you don’t already have an emtrey.config.js file in your project we will create one. If you already have one you may skip Step 1.

Step 1: Create an Emtrey Configuration File

Create a new file in the route of your project named emtrey.config.js

module.exports = {
routes: {}
}

Be sure to commit this file to track changes in git.

Step 2: Add Each Route To Skip

In your Emtrey configuration file, add a property to the exported “routes” object with each route name – with no leading slash, followed by:

module.exports = {
routes: {
'login': {
enabled: false
},
'skip/this/route': {
enabled: false
}
}
}

You will see a specific message in Emtrey’s console output when a route is skipped. Such as:
'Skipping ignored url' with the URL at the end.