node.js - 如何将 node 设置为默认启动 harmony 模式的别名
伊谢尔伦
伊谢尔伦 2017-04-17 11:44:06
0
1
587

学习koa遇到

执行koa时需要在 —-harmony 模式下运行,为了方便可以将 node 设置为默认启动 harmony 模式的别名:
alias node='node --harmony'

怎么设置?

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

reply all(1)
巴扎黑

Add this sentence /home/用户名/.bashrcalias node='node --harmony' to the file
(create it if there is no such file) Or execute this command every time you just start the console

It’s more troublesome under window. First, rename the executable file of node under window, more commonly called node_re, and then create a new text file anywhere and write

in it.
@echo off
node_re --harmony %1 %2 %3 %4 %5 %6 %7 %8 %9

Then rename it to node.bat, and finally put the path to this file in the path environment variable

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template