Skip to content

Instantly share code, notes, and snippets.

@zats
Last active July 11, 2021 16:06
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zats/24354f8bcd3fa9b52bfd to your computer and use it in GitHub Desktop.
Save zats/24354f8bcd3fa9b52bfd to your computer and use it in GitHub Desktop.
Jeeves configuration sample
  • routes – an array of route objects
    • request - configuration of a request.
      • method – a string according to RFC 2616.
      • pattern - a string to match, can be an escaped regex string. If regex is specified, it must match the entire request path.
    • response - configuration of the response.
      • resourcePath - relative path of the resource to serve, if the request was matched.
      • contentType - optional an override for the resource content type. By default it's automatically deduced from the file MIME type.
{
"routes": [
{
"request": {
"method": "GET",
"pattern": "/hello"
},
"response": {
"resourcePath": "path/page.html"
}
},
{
"request": {
"method": "POST",
"pattern": "/info/(\\w+)"
},
"response": {
"resourcePath": "jeeves.json",
"contentType": "application/json"
}
}
]
}
@Booooozo
Copy link

@sash Zats Can I upload files onto my. MacBook using Jeeves using html because I am trying to do that but it is not working, Is any configuration required to achieve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment