WORKDIR /Users/muga/Desktop/directory-tree/
docker build -t <your username>/directory-tree .
docker run -p 8080:8080 -d <your username>/directory-tree
docker ps
docker logs <container id>
docker exec -it <container id> /bin/bash
Head on to localhost:8080/graphql/directory-tree
on POSTMAN
pass this graphql query string
{
directory(url: "<insert-directory-here>")
{
path, children{ path, fileSizeInBytes, children{
path, children {
path, children {
path, fileSizeInBytes, children{
path, children {
path
}
}
}
}
}
}
}
}
To drill deeper we'd have to recursively call include children, we don't didn't want to make the recursion exhaustive. So went about 4/5 levels deep.
(Also, as at now, I don't know how to do that with
graphql
)
POST
this body to localhost:8080/directory-tree
path: <insert-valid-url>
this drills down the directory exhaustively.
npm install
nodemon
Head on to localhost:8080/graphql/directory-tree
on POSTMAN
pass this graphql query string
{
directory(url: "<insert-directory-here>")
{
path, children{ path, fileSizeInBytes, children{
path, children {
path, children {
path, fileSizeInBytes, children{
path, children {
path
}
}
}
}
}
}
}
}
To drill deeper we'd have to recursively call include children, we don't didn't want to make the recursion exhaustive. So went about 4/5 levels deep.
(Also, as at now, I don't know how to do that with
graphql
)
POST
this body to localhost:8080/directory-tree
path: <insert-valid-url>
this drills down the directory exhaustively.