2021年5月10日

接口api文档生成

摘要: 全局安装apidoc npm install apidoc -g 配置apidoc.json { "name": "test", "version": "0.1.0", "description": "练习写接口文档", "title": "学习编写api文档", "url" : "http://1 阅读全文

posted @ 2021-05-10 23:34 铃之森 阅读(250) 评论(0) 推荐(0)

http-server的使用

摘要: 在写前端页面中,经常会在浏览器运行HTML页面,从本地文件夹中直接打开的一般都是file协议,当代码中存在http或https的链接时,HTML页面就无法正常打开,为了解决这种情况,需要在在本地开启一个本地的服务器。 安装 npm install http-server -g 使用 在当前目录下的w 阅读全文

posted @ 2021-05-10 22:20 铃之森 阅读(584) 评论(0) 推荐(0)

node常用插件

摘要: nodemon Nodemon是一个使用工具,它将会见监视源文件中任何的更改并自动重启服务器。Nodemon不会对你的代码产生额外的更改,它只是node命令的替代品。因为当你修改源文件后,如果你用的是原来的node 则必须手动重启 你的更改才会有效。但是如果用的是nodemon,则你不需要手动操作, 阅读全文

posted @ 2021-05-10 11:49 铃之森 阅读(443) 评论(0) 推荐(0)

2021年5月7日

nodejs基于nodemailer插件实现发送邮箱

摘要: 官网地址:https://nodemailer.com/about/ 项目中添加插件nodemailer: npm install nodemailer 发送邮件例子: "use strict"; const nodemailer = require("nodemailer"); // async. 阅读全文

posted @ 2021-05-07 15:39 铃之森 阅读(132) 评论(0) 推荐(0)

2021年4月29日

koa2 中间件的洋葱模型

摘要: 使用脚手架koa-generator 创建koa2项目: 全局安装koa-generator npm install -g koa-generator 创建项目: koa2 test2 进入test2文件夹 然后运行npm install koa2 与nodejs代码对比 koa2封装原生代码的AP 阅读全文

posted @ 2021-04-29 17:41 铃之森 阅读(189) 评论(0) 推荐(0)

2021年4月26日

TypeScript

摘要: 基础类型 持续更新 ...... 阅读全文

posted @ 2021-04-26 22:00 铃之森 阅读(41) 评论(0) 推荐(0)

2021年4月25日

搭建React+TypeScript项目

摘要: create-react-app构建TypeScript项目 create-react-app my-app --template typescript 然后进入项目并启动 cd my-app/ npm run start 项目启动成功,浏览器默认打开http://localhost:3000/ 持 阅读全文

posted @ 2021-04-25 22:07 铃之森 阅读(188) 评论(0) 推荐(0)

2021年4月2日

ant按需加载、配置config-overrides.js文件、项目中引入less、解决TypeError: this.getOptions is not a function错误

摘要: 安装antd模块 npm install antd 按需加载需要安装的模块: npm install react-app-rewired customize-cra babel-plugin-import 引用less需要安装的模块 npm install less less-loader 按需加载 阅读全文

posted @ 2021-04-02 00:31 铃之森 阅读(1309) 评论(0) 推荐(0)

2021年3月26日

Ant Design编辑表格(类组件)

摘要: Ant Design官网编辑表格--类组件写法 import React,{Component} from "react"; import ReactDOM from "react-dom"; import "antd/dist/antd.css"; import { Table, Input, B 阅读全文

posted @ 2021-03-26 00:07 铃之森 阅读(388) 评论(0) 推荐(0)

2021年3月23日

win10全局安装插件却不能全局用,https:/go.microsoft.com/ fwlink/?LinkID=135170禁止运行脚本

摘要: 报错最关键信息 win10 https:/go.microsoft.com/ fwlink/?LinkID=135170禁止运行脚本 或者: tsc : 无法将“tsc”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。 所在位置 阅读全文

posted @ 2021-03-23 00:17 铃之森 阅读(1828) 评论(0) 推荐(0)

导航