Installation Environment

12003

This guide will help you set up the required environment on Windows, macOS, or Linux operating systems, including the Node.js runtime environment, MySQL database, VScode development tool, as well as the optional jianghu-init and jianghu-studio tools.

  • Database Environment: MySQL 5.7+
  • Development Tool: VScode
  • Runtime Environment: Node.js v16.x
  • JianghuJS Tools: jianghu-init 👉Latest Version👈

MySQL Database Environment Installation

MySQL is a popular open-source relational database management system.

  • Windows:
    • Visit the MySQL official website and download the Windows version of the MySQL Installer.
    • Install and run mysql_secure_installation to set the root user's password and other security settings.
  • macOS:
    • Install using Homebrew: Open the terminal and run brew install mysql.
  • Linux (using Ubuntu as an example):
    • Open the terminal and run the following commands to install MySQL:
      sudo apt update
      sudo apt install mysql-server
    • Run mysql_secure_installation to complete the security configuration.

Use Navicat to connect to the MySQL Server above and verify if the installation was successful.

VScode Development Tool Installation

Visual Studio Code (VSCode) is a powerful, cross-platform source code editor.

  • Visit the VSCode official website.
  • Download the version suitable for your operating system and install it.
  • Configure your workspace as needed, such as installing extensions, setting themes, etc.

Node.js Runtime Environment Installation

Node.js is an open-source, cross-platform JavaScript runtime environment that allows you to run JavaScript code on the server side.

  • Visit the Node.js official website.
  • Download the v18.x version that matches your operating system.
  • After successful installation, install yarn:
npm install -g yarn

jianghu-init Installation

  • Installation
# Install using npm
npm install -g @jianghujs/jianghu-init@latest
# Install using yarn
yarn global add @jianghujs/jianghu-init@latest --registry=http://registry.npmmirror.com
  • Check Version
npm list @jianghujs/jianghu-init -g