美文网首页我爱编程
Windows下配置Linux(ubutun) node开发环境

Windows下配置Linux(ubutun) node开发环境

作者: 账房先生2016 | 来源:发表于2018-04-02 18:08 被阅读0次

为什么这样做,因为node-gyp在windows下怎么都装不上。

1.安装ubutun到windows系统

前往windows商店,搜索ubutun下载安装。关键词:Windows Subsystem for Linux

2.安装node到ubutun

# Adding the NodeSource APT repository for Debian-based distributions repository AND the PGP key for verifying packages
$ curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -

# Install Node.js from the Debian-based distributions repository
$ sudo apt-get install -y nodejs

3.想要在 Linux 中访问 Windows 目录的话,直接访问 /mnt/c, /mnt/d 就可以了,其中,c 和 d 代表 Windows 的 C 盘 与 D 盘,无需进行额外的挂载操作。

4.在工程下node app

5.在windows浏览器下,可以通过localhost来访问

相关文章

网友评论

    本文标题:Windows下配置Linux(ubutun) node开发环境

    本文链接:https://www.haomeiwen.com/subject/hrvxhftx.html