Monday, April 6, 2020

mac node mysql apache





cd /usr/local/var/www/json2tree










cd /Users/nicole/node/arcgis_viewer

nodemon --exec npm start








cd /Users/nicole/node/world





mac show hidden file
    CMD + SHIFT + .
 or terminal run:
 defaults write com.apple.finder AppleShowAllFiles YES
https://ianlunn.co.uk/articles/quickly-showhide-hidden-files-mac-os-x-mavericks/








mac exit full screen
    cmd + ctrl + f

















---------------

mac visual studio code, show tabs
you need edit setting.json file, and change from false to true

settings.json, located at

    Windows %APPDATA%\Code\User\settings.json
    macOS $HOME/Library/Application Support/Code/User/settings.json
    Linux $HOME/.config/Code/User/settings.json


{
    "workbench.editor.showTabs": true
}
---------------











*********  mac install nodemon *************



  // terminal, must use root , otherwise, failed install nodemon Global

    sudo -s



  // Must install Global

  sudo npm i -g nodemon




//local install will failed to start later
//Do not use:   npm install --save-dev nodemon



nodemon --exec npm start

*********  mac install nodemon *************











=================== bookmark =======================

cpanel
https://104.238.125.233:2083/cpsess6948351829/frontend/paper_lantern/index.html?login=1&post_login=48187625039743


WHM
https://104.238.125.233:2087/cpsess8149350323/?login=1&post_login=43362710941285



goDaddy, product
https://myservers.godaddy.com/208989







................. install mysql on mac with Homebrew .......................

Using Homebrew service to download

Homebrew is a package manager for Mac which greatly simplifies the process of installing command line software and tools on a Mac. It’s one of the most common ways to install an app on Mac.

To install Homebrew, open Terminal and run:

$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Note: Homebrew will download and install Command Line Tools for Xcode as part of the installation process. This might take a lot of time since those apps are not lightweight.

Then install MySQL using Homebrew:

$ brew install mysql
Install brew services:

$ brew tap homebrew/services

Load and start the MySQL service:

$ brew services start mysql

Expected output: Successfully started mysql (label: homebrew.mxcl.mysql)

Open Terminal and execute the following command to set the root password:

mysqladmin -u root password 'yourpassword'
Now your MySQL server is ready.

              


        **** DO NOT FORGET ****
        
        reset root password:   4a41
        
        in order for node.js connect to mysql, must run following sql at sql-workbench
        
        ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '4a41'


          without run this sql, will get error, when node.js connect mysql client.
          
          Client does not support authentication protocol requested by server; consider upgrading MySQL client


................. install mysql on mac with Homebrew .......................





------------------- install NodeJS and NPM on Mac using Homebrew -------------------

https://medium.com/@hayasnc/how-to-install-nodejs-and-npm-on-mac-using-homebrew-b33780287d8f


Step 1: Install Homebrew

$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"



Step 2: Install Node via Homebrew
$ brew install node



   check node and npm version

$node -v
v12.7.0

$npm -v
6.10.0

------------------- install NodeJS and NPM on Mac using Homebrew -------------------
















****************** ******************* **********************

Installing Git on a Mac
Open a terminal window.

Step 1 – Install Homebrew
Homebrew […] simplifies the installation of software on the Mac OS X operating system.

– Homebrew – Wikipedia

Copy & paste the following into the terminal window and hit Return.

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew doctor
You will be offered to install the Command Line Developer Tools from Apple. Confirm by clicking Install. After the installation finished, continue installing Homebrew by hitting Return again.

Step 2 – Install Git
Copy & paste the following into the terminal window and hit Return.

brew install git
You can use Git now.
****************** ******************* **********************

No comments: