编写 hello world 命令行程序

要求:

  • 创建 nodejs-demo 目录
  • .tern-project 代码自动补全配置文件,放到 nodejs-demo 目录下,操作方法如下:
    • nodejs-demo 目录下,运行 wget https://sample.wangding.in/nodejs/tern-project
    • nodejs-demo 目录下,运行 mv tern-project .tern-project
  • 创建 01-introduction 目录
  • 编写 01-hello-world.js
  • 在命令行打印 hello world! 字符

//mkdir nodejs-demo

//cd nodejs-demo

// https://sample.wangding.in/nodejs/tern-project

//mv tern-project .tern-project

//mkdir 01-introduction

//touch 01-hello-world.js

//vim 01-hello-world.js

#!/usr/bin/node

console.log('hello world!');

//chomd 755 01-hello-world

//./01-hello-world.js

猜你喜欢

转载自blog.csdn.net/CHENpeiyingCHEN/article/details/82763825