会员
周边
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
懒懒同学
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
3
4
5
6
7
8
9
10
11
···
13
下一页
2020年1月15日
使用node.js实现apache功能
摘要: 1、先实现在url中输入文件路径能展示对应文件内容功能 const http = require('http') const fs = require('fs') const server = http.createServer() const wwwDir = '/Users/lianglanla
阅读全文
posted @ 2020-01-15 12:55 懒懒同学不懒
阅读(449)
评论(0)
推荐(0)
2020年1月9日
常用Content-type对照表
摘要: 更加详细的可点击https://tool.oschina.net/commons
阅读全文
posted @ 2020-01-09 15:22 懒懒同学不懒
阅读(540)
评论(0)
推荐(0)
2020年1月7日
Web服务器开发
摘要: ip地址和端口号 ip地址用来定位计算机 端口号用来定位具体的应用程序 一切需要联网通信的软件都会占用一个端口号 端口号的范围从0-65536之间 在计算机中有一些默认端口号最好不要使用 如http服务的80 在开发过程中使用一些简单好记的就可以了,比如3000/5000等没什么含义
阅读全文
posted @ 2020-01-07 19:32 懒懒同学不懒
阅读(210)
评论(0)
推荐(0)
2020年1月6日
MAC使用命令行解压rar
摘要: 使用homebrew安装unrar 安装完成后cd到rar文件目录,使用终端命令解压
阅读全文
posted @ 2020-01-06 14:08 懒懒同学不懒
阅读(3233)
评论(0)
推荐(0)
2020年1月5日
Node中的模块系统
摘要: 核心模块 Node为Javascript提供了很多服务器级别的API,绝大多数都被包装到了一个具名的核心模块中,例如文件操作的fs核心模块,http服务构建的http模块等,核心模块的使用必须通过require方法加载 const path = require('path') fs-文件系统 htt
阅读全文
posted @ 2020-01-05 16:31 懒懒同学不懒
阅读(133)
评论(0)
推荐(0)
2020年1月4日
Node.js核心模块-path路径
摘要: 用于处理文件路径和目录路径 引入 const path = require('path') path.extname(path) 返回扩展名。从最后一次出现 . 字符到字符串结束。 const path = require('path') console.log(path.extname('inde
阅读全文
posted @ 2020-01-04 14:01 懒懒同学不懒
阅读(341)
评论(0)
推荐(0)
2020年1月3日
Node.js核心模块-os操作系统
摘要: 获取操作系统相关信息 引用 const os = require('os') os.cpus() 获取当前机器的CPU信息 console.log(os.cpus()) 打印结果: [ { model: 'Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz', spee
阅读全文
posted @ 2020-01-03 12:57 懒懒同学不懒
阅读(370)
评论(0)
推荐(0)
2020年1月2日
Node.js核心模块-net
摘要: net.Socket 类 socket.remotePort 访问服务器的远程端口 const http = require('http'); const server = http.createServer((req, res) => { console.log(`端口是${req.socket.
阅读全文
posted @ 2020-01-02 19:33 懒懒同学不懒
阅读(174)
评论(0)
推荐(0)
2019年12月30日
ie8兼容rgba写法
摘要: ie使用filter解决半透明兼容性问题 颜色#19ffffff由两部分组成,第一部分是#后面的19,是透明度0.1的IE filter值,从0.1到09每个数字对应一个IE filter值。第二部分是色值
阅读全文
posted @ 2019-12-30 11:35 懒懒同学不懒
阅读(207)
评论(0)
推荐(0)
2019年12月25日
Node.js核心模块-http
摘要: 通过node中的http模块可以创建编写服务器 引入 const http = require('http') http举例使用: const http = require('http') //引入 const server = http.createServer() //创建web服务器 // 服
阅读全文
posted @ 2019-12-25 16:13 懒懒同学不懒
阅读(512)
评论(0)
推荐(0)
上一页
1
···
3
4
5
6
7
8
9
10
11
···
13
下一页
公告