search

Home  >  Q&A  >  body text

node.js - Window平台下使用Vagrant进行Nodejs开发,大家使用怎样的同步方式

搭建了Win8(host)+Vagrant+Virtualbox+ubuntu(guest)的环境,在同步方式的问题上遇到了一些问题

想知道大家使用Vagrant在window下开发nodejs时都使用怎样的文件夹同步方式。

PHPzPHPz2783 days ago722

reply all(4)I'll reply

  • 高洛峰

    高洛峰2017-04-17 11:54:47

    I don’t use Vagrant, but directly use Win7 + Virtual Box + Ubuntu.
    My method:
    1. Share a folder under Windows (don’t ask me how to share it, use Baidu by yourself, the same below)
    2. Use mount.cifs to mount this folder to a directory in Ubuntu
    3. Then just access this directory directly

    The efficiency is acceptable.

    rsync is very inconvenient. In fact, I have always wanted to change to using NFS to share files, but the efficiency of shared folders in Windows is acceptable, and I am too lazy to do it.

    reply
    0
  • ringa_lee

    ringa_lee2017-04-17 11:54:47

    Conclusion,
    First of all, thank you all for your replies. As for the friend who is always complaining, I won’t comment further.

    First of all, let’s talk about why we have to do everything we can to develop directly under window. There are three main points

    1. Try something new, and what I know about ruby/node is that sometimes some modules don’t have good solutions under window
    2. It’s purely for convenience. I don’t want to install a lot of dependencies in the window that I actually use, such as databases, slow down the startup speed, eat up memory, etc. After all, coach I still want to play Dota.
    3. The build environment mentioned earlier mainly refers to ember-cli. As of now, the build speed difference between this build tool on window and unix-like systems is still relatively large.

    The final solution chosen is window + vagrant + ubuntu +virtualbox

    Ubuntu builds Samba and opens files for editing directly under window, which basically solves the problems encountered before. The build speed and file synchronization speed have basically reached a level that I am satisfied with.

    reply
    0
  • 黄舟

    黄舟2017-04-17 11:54:47

    Just use webstorm directly under win. Why use a virtual machine? ?

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-17 11:54:47

    phpstorm webtore rubymine pycharm jetbrain both have ftp direct editing and ftp autoupload functions

    You can also change to a mac...

    reply
    0
  • Cancelreply