How to Set node as Alias for Starting harmony Mode by Default

  node.js, question

Learning koa met

When executing koa, you need to run in —-harmony mode. for convenience, node can be set as the alias for starting harmony mode by default:
alias node=’node –harmony’

How to set it up?

On file/home/ username /.bashrc(New without this document) Add this sentence toalias node='node --harmony'
Or execute this command every time you just start the console.

It is more troublesome under the window. First, put it under the window.nodeRenaming the execution file ofnode_re, and then create a new text file anywhere, write inside

@echo off
 Node_re --harmony% 1% 2% 3% 4% 5% 6% 7% 8% 9

Then rename itnode.batFinally, put the path of this file into the PATH environment variable inside