Skip to content

Show details json#83

Open
coolaj86 wants to merge 3 commits into
expressjs:masterfrom
coolaj86:show-details-json
Open

Show details json#83
coolaj86 wants to merge 3 commits into
expressjs:masterfrom
coolaj86:show-details-json

Conversation

@coolaj86

@coolaj86 coolaj86 commented Aug 13, 2018

Copy link
Copy Markdown

PR Dependencies:

Description

Show basic file details in json (w3-style file object)

curl https://pretty-stingray-41.telebit.ppl.family/demo/ -H 'Accept: application/json' | python -m json.tool
[
    {
        "lastModified": "2018-08-13T03:45:40.000Z",
        "name": "..",
        "size": 1054,
        "type": "inode/directory"
    },
    {
        "lastModified": "2018-07-11T00:34:26.000Z",
        "name": "foo.txt",
        "size": 4,
        "type": "text/plain"
    }
]

@greggman

greggman commented Apr 4, 2020

Copy link
Copy Markdown

Would it be good to match nginx here? Looks like type in nginx is one of "directory", "file", "other" and mtime is RFC1123-date of HTTP-date defined by RFC2616

@coolaj86

Copy link
Copy Markdown
Author

@greggman I'd side with doing it the JavaScript way because this is a JavaScript library. That said, I'd be happy to make that an option (or even the default) if things got moving forward again.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants