Vue development environment installation (NVM management node)

Time:2022-5-20
Because the latest need to reconstruct a page, the original page is written in jija2 + python. At present, the background can quickly provide API interface, but the rendering speed of the front-end page is too slow, so we intend to reconstruct it with Vue. Take this opportunity to improve the learning of front-end knowledge, adopt the front-end and back-end separation mode, and use Vue to develop front-end pages.

Build development environment

  1. Install NVM
    Install node and use NVM for node version management. This tool is similar to pyenv of Python. You can freely download, manage and switch node versions

    https://github.com/creationix…

    Refer to the instructions: NVM can be installed quickly

    curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
    export NVM_DIR="$HOME/.nvm"
    [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
        
  1. List item
  2. Install Vue cli scaffold

       npm install -g @vue/cli
    

    After installation, Vue – version check the version number

  3. Create a project using Vue

    vue create projectname
       Select according to the prompt:
       ? Please pick a preset: default (babel, eslint)
       ?  Your connection to the default npm registry seems to be slow.
      Use https://registry.npm.taobao.org for faster installation? Yes

    I chose the source of Taobao by default!!! nice!

    The project named ProjectName is created

  4. Installation project related dependencies
    The newly created project cannot run directly, because the related dependencies have not been configured locally, so you need to switch to the project folder and execute:
    npm install
    To initialize your project

    npm run server

Recommended Today

RabbitMQ study notes

Table of contents Related concepts RabbitMQ Install RabbitMQ core part Hello World Work Queues release confirmation switch fanout exchange (pub/sub) direct exchange topic exchange dead letter queue delay queue Release Confirmation Advanced The switch receives the message confirmation callback Fallback message to producer when switch is not routable Backup switch other idempotency priority queue lazy […]