使用git bash 代替cmd
2015-10-30 09:44
651 查看
上一文章,用Node.js建HTTP服务器,然后在cmd启动,这次尝试用git bash。
git bash 也是命令行工具,画面更好看,使用更方便,可以替代cmd。
下载git:https://git-for-windows.github.io/
安装省略....
第一步:打开Git Bash,输入代码,获取实例文件:
第二步:启动
第三步,F盘创建tinyphp.js
第四步:在F盘下运行node tinyphp.js
![](http://images2015.cnblogs.com/blog/446475/201510/446475-20151030093917529-2030743660.jpg)
然后打开浏览器访问: http://127.0.0.1:1337
git bash 也是命令行工具,画面更好看,使用更方便,可以替代cmd。
下载git:https://git-for-windows.github.io/
安装省略....
第一步:打开Git Bash,输入代码,获取实例文件:
git clone git://github.com/angular/angular-phonecat.git
第二步:启动
npm start
第三步,F盘创建tinyphp.js
var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello World\n'); }).listen(1337, "127.0.0.1"); console.log('Server running at http://127.0.0.1:1337/'); 复制代码
第四步:在F盘下运行node tinyphp.js
![](http://images2015.cnblogs.com/blog/446475/201510/446475-20151030093917529-2030743660.jpg)
然后打开浏览器访问: http://127.0.0.1:1337
![](http://images2015.cnblogs.com/blog/446475/201510/446475-20151029213714950-1834885463.png)
相关文章推荐
- Bash Shell编程要点小结
- 什么是shell,shell基础由浅入深,常用的shell命令、用法、技巧
- ubuntu操作系统写shell的for循环会遇到的问题
- sqlite3 shell的使用
- sqlite3 shell的使用
- shell脚本实例参考
- shell script 学习笔记-----标准输出
- Shell脚本之监视主进程的运行状态,异常退出后自动重启
- shell脚本:打印文本中字符数不大于6的单词
- shell脚本:打印文本中字符数不大于6的单词
- 《Linux Shell》笔记之sed与正则表达式(实例总结) 未完待续
- 一定要记住的一些shell命令
- linux shell 基础 使用日志与心得
- 安装ssh命令
- shell 字符串(六)
- shellinabox终端模拟器安装
- 终端模拟软件xshell设置编码方式UTF-8
- shell编程控制结构:expr、let、for、while、until、shift、if、case、break、continue、函数、select
- Shell简易程序判断某个日期是星期几
- HBase 常用Shell命令