随笔分类 - node
摘要:node版本太高,小于node17版本可行
阅读全文
摘要:node的导入与导出 导出入与批量导出入 导出 // a.js 导出了一个函数fn exports.fn = params => { return `${params } params `; }; 导入 //main.js 导入了一个函数 const { fn } = require('./a.js
阅读全文
摘要:准备: 进入自己的邮箱 点击设置 找到以下服务设置(不同的邮箱入口不同,但是配置是一样的) 将以上服务开启 获取授权码 安装nodemailer模块 npm i nodemailer -S 封装 封装发送验证码功能模块 const nodemailer = require(`nodemailer`)
阅读全文
摘要:不同的请求方式,在node中的req的位置是不同的 get方式请求的数据在req.query里,除get以外的参数在req.body中 post,put,delete get请求 // web端的网络请求 $(function () { $(`#btn`).on(`click`, () => { $
阅读全文
摘要:ejs是node使用的第三方模板渲染引擎。 在node中使用 install ejs npm i ejs -S use ejs // node iniput file index.js // require // 导入path const path = require("path"); // 导入e
阅读全文
摘要:/* * @Descripttion: * @version: * @Author: jack * @Date: 2022-03-07 22:18:09 * @LastEditors: jack * @LastEditTime: 2022-03-07 22:37:57 */ // 导入http模块
阅读全文