Search code examples
node.jsexpressexpress-generator

What is the point of "cd ." in "cd . && npm install"?


I'm using express generator. After running the generator it outputs the following:

   install dependencies:
     $ cd . && npm install

What is the point of cd .?


Solution

  • It means that you ran this:

    $ express
    

    (or possibly express .)

    In other words, you told express-generator to create a project in the current working directory. Alternatively, you could have provided a subdirectory name:

    $ express foo
    

    In that case, the commandline it generates makes a bit more sense:

    install dependencies:
      $ cd foo && npm install