上一页 1 ··· 35 36 37 38 39 40 41 42 43 ··· 88 下一页
摘要: 总述: 1.各人的代码彻底分开,创建自己的api文件、组件文件夹、仓库文件夹、页面文件夹、工具函数文件等,仅保留极其少的公共文件 2.各人写的代码负责到底,实现方式充分发挥创造性,框架不限制具体实现方式 3.为什么不按业务组织代码,而是按人组织代码? 1)页面完全按业务组织代码,也是最应该组织的 2 阅读全文
posted @ 2021-11-02 14:18 徐同保 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 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 徐同保 阅读(10) 评论(0) 推荐(0) 编辑
摘要: Node.js给我们提供了cluster模块,它可以生成多个工作线程来共享同一个TCP连接 instances:2 代表工作线程数量为2 如果给定的数字为0,PM2则会根据你CPU核心的数量来生成对应的工作线程。 module.exports = { apps: [ { name: 'my-nuxt 阅读全文
posted @ 2021-10-28 15:27 徐同保 阅读(20) 评论(0) 推荐(0) 编辑
摘要: 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 徐同保 阅读(11) 评论(0) 推荐(0) 编辑
摘要: 调接口 读json文件 修改json文件 nodemon或pm2监控到文件变化,自动重启 const restart = async (req, res) => { //spawn.sync(`runChild6.bat`, [], { stdio: 'inherit' })\ const rest 阅读全文
posted @ 2021-10-25 10:10 徐同保 阅读(0) 评论(0) 推荐(0) 编辑
摘要: 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 徐同保 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 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 徐同保 阅读(0) 评论(0) 推荐(0) 编辑
摘要: 81端口和84端口部署了两套node服务,接口相同 如果对81端口的请求加上特定的字符,则把请求转发到84上 app.js: const express = require('express') const bodyParser = require('body-parser') const cors 阅读全文
posted @ 2021-10-21 15:48 徐同保 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 备份这三个文件 需要恢复时把这三个文件拷贝回来,再重新读取一下: 阅读全文
posted @ 2021-10-21 10:43 徐同保 阅读(0) 评论(0) 推荐(0) 编辑
摘要: mklink /j "C:\temp" "D:\temp" 建立完成后 修改D盘temp文件夹里的内容,C盘temp文件夹里的内容会同步修改 修改C盘temp文件夹里的内容,D盘temp文件夹里的内容也会同步修改 阅读全文
posted @ 2021-10-20 13:54 徐同保 阅读(2) 评论(0) 推荐(0) 编辑
上一页 1 ··· 35 36 37 38 39 40 41 42 43 ··· 88 下一页