会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
徐同保
web前端行业的小学生
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
35
36
37
38
39
40
41
42
43
···
88
下一页
2021年11月2日
react项目代码结构
摘要: 总述: 1.各人的代码彻底分开,创建自己的api文件、组件文件夹、仓库文件夹、页面文件夹、工具函数文件等,仅保留极其少的公共文件 2.各人写的代码负责到底,实现方式充分发挥创造性,框架不限制具体实现方式 3.为什么不按业务组织代码,而是按人组织代码? 1)页面完全按业务组织代码,也是最应该组织的 2
阅读全文
posted @ 2021-11-02 14:18 徐同保
阅读(36)
评论(0)
推荐(0)
2021年11月1日
antd table 编辑单元格功能
摘要: EditCell.js: import React, { useState, useEffect, useRef } from 'react' import { Popover, Input, Form, Button } from 'antd' import Icon from './Icon'
阅读全文
posted @ 2021-11-01 10:19 徐同保
阅读(44)
评论(0)
推荐(0)
2021年10月28日
pm2集群模式(exec_mode: ‘cluster‘)
摘要: Node.js给我们提供了cluster模块,它可以生成多个工作线程来共享同一个TCP连接 instances:2 代表工作线程数量为2 如果给定的数字为0,PM2则会根据你CPU核心的数量来生成对应的工作线程。 module.exports = { apps: [ { name: 'my-nuxt
阅读全文
posted @ 2021-10-28 15:27 徐同保
阅读(77)
评论(0)
推荐(0)
2021年10月27日
修改hosts文件模拟域名解析,Nginx反向代理实现二级域名转发
摘要: nginx.conf: #user nobody; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/n
阅读全文
posted @ 2021-10-27 10:28 徐同保
阅读(33)
评论(0)
推荐(0)
2021年10月25日
通过接口控制node服务自动重启
摘要: 调接口 读json文件 修改json文件 nodemon或pm2监控到文件变化,自动重启 const restart = async (req, res) => { //spawn.sync(`runChild6.bat`, [], { stdio: 'inherit' })\ const rest
阅读全文
posted @ 2021-10-25 10:10 徐同保
阅读(11)
评论(0)
推荐(0)
2021年10月23日
node获取主机名
摘要: import os from 'os' const port = 81 const hostname = os.hostname() const host = { 'LAPTOP-4KDIA4A3': 'http://localhost', iZ6ilh61jzkvrhZ: 'http://39.9
阅读全文
posted @ 2021-10-23 09:42 徐同保
阅读(16)
评论(0)
推荐(0)
2021年10月21日
JS生成10000个数字加字母的不重复的随机字符串
摘要: const arr = [] for (let i = 0; i < 10000; i++) { const tempStr = Math.random().toString(36).substr(2, 6) arr.push(tempStr) } //es6提供的new Set也可以去重 let
阅读全文
posted @ 2021-10-21 18:15 徐同保
阅读(12)
评论(0)
推荐(0)
nodejs接口转发
摘要: 81端口和84端口部署了两套node服务,接口相同 如果对81端口的请求加上特定的字符,则把请求转发到84上 app.js: const express = require('express') const bodyParser = require('body-parser') const cors
阅读全文
posted @ 2021-10-21 15:48 徐同保
阅读(20)
评论(0)
推荐(0)
Jenkins数据备份
摘要: 备份这三个文件 需要恢复时把这三个文件拷贝回来,再重新读取一下:
阅读全文
posted @ 2021-10-21 10:43 徐同保
阅读(12)
评论(0)
推荐(0)
2021年10月20日
Windows建立目录软连接
摘要: mklink /j "C:\temp" "D:\temp" 建立完成后 修改D盘temp文件夹里的内容,C盘temp文件夹里的内容会同步修改 修改C盘temp文件夹里的内容,D盘temp文件夹里的内容也会同步修改
阅读全文
posted @ 2021-10-20 13:54 徐同保
阅读(41)
评论(0)
推荐(0)
上一页
1
···
35
36
37
38
39
40
41
42
43
···
88
下一页
公告