Tool

get请求 curl https://cnodejs.org/api/v1/topics post请求 1、application/x-www-form-urlencoded curl -d'username=admin&password=123456' -X POST http://localhost:8080/api/user/login 2、application/json curl http://localhost:8080/api/user/login -X POST -d '{"username": …
创建文件 touch .prettierrc.js 内容 .prettier.js module.exports = { arrowParens: "avoid", bracketSpacing: true, printWidth: 120, semi: true, singleQuote: true, tabWidth: 4, trailingComma: "all", jsxSingleQuote: false, jsxBracketSameLine: false, useTabs: false, overrides: [ { files: …
打开bash_profile $ cd ~ $ vi .bash_profile 内容 1、快速切换到常用目录 alias cd.pw="cd /Users/pengjie/work/panda-wechat" alias cd.p5="cd /Users/pengjie/work/panda-h5" alias cd.doc="cd /Users/pengjie/www/doc.pengjielee.cn" alias cd.www="cd /Users/pengjie/www" alias cd.try="cd …
开始 我们的命令行工具起名xun-cli,实现功能有: 显示当前时间; 查询天气; 查看本地IP; 创建目录 $ mkdir xun-cli $ cd xun-cli $ npm init -y $ mkdir src $ cd src $ touch index.js 问好 1、index.js #!/usr/bin/env node console.log("hello xun-cli") 2、执行 $ node src/index.js //output: hello xun-cli 输出一个漂亮的LOGO 1、安装依赖 $ npm install chalk #在命令行 …