Advanced Routes

DinoSsr is an experimental work in progress and subject to change!

DinoSsr is built upon VelociRouter. The request and response are passed through all matching handles. Routes can also be JavaScript or TypeScript files exporting a handle. The same file path and URL pattern matching is applied.

JavaScript routes can export a GET function.


export const pattern = '/*';

export const order = 999;

export const GET = async (props) => {
  if (props.response) {
    props.response.headers.set('x-powered-by', 'DinoSsr');

DELETE, PATCH, POST, and PUT are also supported matching their respective HTTP methods.

The optional order export gives an explicit order to assign the handle. If no order is exported routes are handled in the order they're discovered.


See the VelociRouter documentation for all props passed to the handle function.


Includes the follow properties:

The ServeHandlerInfo for the request.


The current DinoSsr deploy hash (useful for cache busting, etc).


A Map object to read, set, or delete cookies in the response header.


An object to read and assign context data.


An object to read and assign context data.