Skip to content

How do I run this?(Node/NPM beginner) #92

Open
@WonderboyPark

Description

@WonderboyPark

Please forgive me for this question, but I literally just started looking into node.js and NPM the directory tree > JSON is exactly what i need for a project at work. But how do I run this?

I installed Node.js and installed directory-tree, have a app.js and can see stuff in the terminal(console.log("Hello")).

Do i just copy the following into app.js and run it after i change the dirTree path?

const dirTree = require("directory-tree");
const tree = dirTree("/some/path");

When i have tried this the response is [Function: directoryTree]. will the JSON show up in the terminal?

again sorry about knowing nothing really but any help would be much appreciated

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions