zoukankan      html  css  js  c++  java
  • 本地与服务端保持随时同步问题

    1. 问题描述

    在服务端开发时,我们需要把本地开发的代码发布到服务端,尤其是在使用lua这种脚本时,实时的同步lua代码变得尤为重要

    1. 解决方案

    今天介绍的方案是使用nobone-sync这个工具来实现

    1. 服务端安装
    • nodejs安装
    • npm install -g nobone-sync
    • 配置文件sync-config.js
    module.exports = {
        rootAllowed: '/home/sync',
        host: '127.0.0.1',
        port: 8099,
        pattern: '**',
        password: 'test',
        algorithm: 'aes128',
        onChange: function(type, path, oldPath){}
    };
    
    • 启动 nobone-sync -s sync-config.js
    1. 客户端安装
    • nodejs安装
    • npm install -g nobone-sync
    • 配置文件sync-config.js
    module.exports = {
        localDir: 'h:\sync\test\',
        remoteDir: '/home/sync/test/',
        host: '服务器地址',
        port: 8099,
        pattern: '**',
        password: 'test',
        pollingInterval: 800
    };
    
    • 启动 nobone-sync sync-config.js
    1. 最后的效果
  • 相关阅读:
    python3下import MySQLdb出错问题
    循环单链表
    双端链表
    单链表
    静态链表
    hotspot目录结构
    volatile分析
    centos7 python环境安装
    jconsole连接本地进程报安全连接失败
    redis分布式锁
  • 原文地址:https://www.cnblogs.com/zjzyh/p/6289505.html
Copyright © 2011-2022 走看看