上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 33 下一页
摘要: 1. 定义路由 app.METHOD(PATH, HANDLER); // get 方法 app.get('/', (req, resp) => { resp.send('GET method'); }); // post 方法 app.post('/', (req, resp) => { resp 阅读全文
posted @ 2022-02-19 14:49 箫笛 阅读(247) 评论(0) 推荐(0)
摘要: 中间件是可以访问请求对象,响应对象以及next()函数,可以完成如下任务: 执行任何代码 更改请求和响应对象 结束请求处理 调用下一个中间件 1. 全局中间件 //创建应用 const express = require('express'); const app = express(); //创建 阅读全文
posted @ 2022-02-19 14:35 箫笛 阅读(188) 评论(0) 推荐(0)
摘要: 1. 初始化项目 mkdir express-example cd express-example npm init -y npm install body-parser express ejs --save 2. 编写入口文件 // 导入express 模块 const express = req 阅读全文
posted @ 2022-02-19 11:19 箫笛 阅读(147) 评论(0) 推荐(0)
摘要: 1. 条件测试格式 简单条件测试 if [ condition ] then commands fi 注意condition条件表达式在前后方括号之后和之前各有一个空格,否则会出现语法错误 逻辑与条件测试 if [ condition1 ] && [ condition2 ] then comman 阅读全文
posted @ 2022-02-14 16:24 箫笛 阅读(103) 评论(0) 推荐(0)
摘要: 1. if-then 语句 if command then commands fi 2. if-then-else 语句 if command then commands else commands fi 3. if-then-elif-then-else 语句 if command1 then c 阅读全文
posted @ 2022-02-14 15:38 箫笛 阅读(60) 评论(0) 推荐(0)
摘要: 设置 conda 环境是否在命令行自动开启 conda config --set auto_activate_base false 配置 conda 增加频道 conda config --add channels bioconda 删除频道 conda config --remove channe 阅读全文
posted @ 2022-02-12 22:00 箫笛 阅读(177) 评论(0) 推荐(0)
摘要: 1. 函数默认退出状态码 function isDirExist { local dir=$1 ls $dir } dir=/path/test/ isDirExist "$dir" if [ $? -eq 1 ] then echo "The $dir is not exist" exit fi 阅读全文
posted @ 2022-02-12 14:18 箫笛 阅读(87) 评论(0) 推荐(0)
摘要: brew 的安装 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" /usr/bin/ruby -e "$(curl -fsSL https://raw.gi 阅读全文
posted @ 2022-02-12 13:05 箫笛 阅读(91) 评论(0) 推荐(0)
摘要: 1. <Ctrl-O> 使vim 从插入模式暂时回到普通模式,可以执行普通模式命令后,恢复插入模式。 阅读全文
posted @ 2022-01-26 12:15 箫笛 阅读(141) 评论(0) 推荐(0)
摘要: 1. <Ctrl-A> 增大当前数字 2. <Ctrl-X> 减小当前数字 3. <Ctrl-G> 查看当前文件的文件路径 4. g<Ctrl-G> 查看文件当前光标的详细信息 5. K 在文档手册查找当前关键字, set keywordprg? 可以查看当前文件所使用的文档查看命令设置 6. ~ 阅读全文
posted @ 2022-01-26 12:02 箫笛 阅读(179) 评论(0) 推荐(0)
上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 33 下一页