cancel
Showing results for 
Search instead for 
Did you mean: 

Target definition in xs-app.json

sergey_korolev
Active Contributor
4,276

I understand that everybody knows it and it's probably my personal disorder. Nevertheless: could anyone share a clue on what "$1" exactly mean in xs-app.json route definition? Something like this:

{
"source": "^/some_url/(.*)$",
"target": "$1",
"destination": "some_destination"
}
View Entire Topic
thomas_jung
Developer Advocate
Developer Advocate

The syntax route source/target is all regular expression based. Therefore I'd suggest just searching/reading up on the general concept of regular expression (particularly in the context of JavaScript as that is what the app router is written in). For example:

https://stackoverflow.com/questions/16702924/how-to-explain-1-2-in-javascript-when-using-regular-exp...

sergey_korolev
Active Contributor

Thanks Thomas,

Clear. Would be much helpful to add at least similar reference to support code examples in the documentation.