![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
node.js
小达不溜儿
个人笔记
展开
-
设置终端console.log信息颜色
【代码】设置终端console.log信息颜色。原创 2023-01-03 14:47:47 · 5050 阅读 · 1 评论 -
【node】express热更新&跨域
express热更新:npm install supervisor修改package.json中scripts,"start": "supervisor bin/www"express跨域:app.js:app.all('*', function(req,res,next) { res.header('Access-Control-Allow-Origin', '*'); next();})原创 2021-09-21 12:18:11 · 126 阅读 · 0 评论 -
node.js记录
SemverSemver是一个专门分析Semantic Version(语义化版本)的工具,“semver”其实就是这两个单词的缩写。Npm使用了该工具来处理版本相关的工作。// 计较两个版本号的大小semver.gt(‘1.2.3’, ‘2.3.4’) // falsesemver.lt(‘1.2.3’, ‘2.3.4’) // true// 验证版本号是否合法,返回null即不合法semver.valid(‘1.2.3’) // ‘1.2.3’semver.valid(‘a.b.c’) /原创 2021-08-31 22:05:48 · 77 阅读 · 0 评论