• Write the first page with nodejs


    Background: in the remaining months of this year, we will learn back-end development. Use nodejs and MYSQL to write back-end interfaces. First, use nodejs to write a page Step 1: create a nodejs folder on disk e, which contains two folders, app and server Step 2: run the command under the server folder NPM init […]

  • The function of generating verification code with nodejs


    Verification code is a very common anti cheating and anti attack means. Actually, it’s not difficult for people with good technology to realize this function, but not everyone, and every language is naturally suitable for a certain function… However, we can block differences and simplify problems by encapsulating interfaces. Now we can use a simple […]

  • Simple operation example of downloading pictures in batch by node.js


    The example of this paper describes the simple operation of node.js to download pictures in batch. To share with you for your reference, as follows: Use node.js to download pictures in batch First, get the picture link: const img = [ “https://imgs.developpaper.com/imgs/52218400506629423.jpg”, “https://imgs.developpaper.com/imgs/52218400540139692.jpg”, “https://imgs.developpaper.com/imgs/52218400540118251.jpg”, “https://imgs.developpaper.com/imgs/52218400540069242.jpg”, “https://imgs.developpaper.com/imgs/52218400681111127.jpg”, “https://imgs.developpaper.com/imgs/52218400703641344.jpg”, “https://imgs.developpaper.com/imgs/52218400854321042.jpg”, “https://imgs.developpaper.com/imgs/52218400847773096.jpg”, “https://imgs.developpaper.com/imgs/52218400859178000.jpg”, “https://imgs.developpaper.com/imgs/52218400865596453.jpg”, “https://imgs.developpaper.com/imgs/52218400902911909.jpg”, “https://imgs.developpaper.com/imgs/52218400953029599.jpg”, “https://imgs.developpaper.com/imgs/52218400989455804.jpg”, “https://imgs.developpaper.com/imgs/52218401005976517.jpg”, […]

  • Browser working principle and practice summary II


    JavaScript execution mechanism in browser 1、 JavaScript variable promotion, execution order showName() console.log(myname) function showName() { Console. Log (‘function showname executed ‘); } The above code execution results have the following three conclusions: During execution, if an undeclared variable is used, the JavaScript execution will report an error. Using a variable before it is defined […]

  • Introduction to docker for front-end engineers


    Why do we use docker? In the past, when we need to deploy new applications for business development, Devops small partners usually buy a server, but they don’t know how high the configuration of the new application needs, which often leads to waste of resources. When the virtual machine appears, it can let us run […]

  • One click to build a docker based nodejs and PHP development environment (open source project)


    Recently, I wrote a new project, one click deployment of nodejs, PHP development environment (docker, nodejs, PHP, nginx, Mongo, mysql, redis) Recently, I started to write nodejs and PHP projects at the same time, and also deployed them to test, pre release and online environments. Other colleagues also need a set of the same environment. […]

  • Analysis of mongodb database instance operated by node.js


    This paper describes the operation of mongodb database by node.js. To share with you for your reference, as follows: Node.js operation mongodb npm init npm i mongodb –save { “name”: “test”, “version”: “1.0.0”, “description”: “”, “main”: “app.js”, “scripts”: { “test”: “echo \”Error: no test specified\” && exit 1″ }, “author”: “”, “license”: “ISC”, “dependencies”: { […]

  • Three Google style git interview questions and their solutions


    First question: push the configuration file to the remote warehouse. How to delete the configuration file of the remote warehouse? This file should be used locally. This kind of operation error is quite common. It is generally solved as follows: git rm –cached filename echo filename >> .gitignore First, explain the second step: local needs, […]

  • Development of national stations and sub stations


    How to develop the sub station reasonably Reference resources 1. Vuepress — theme customization 2,ant design landing 3. Datav data visualization 4. Elementui as dependency 5. Jd.com design ideas (modularization) read.jd.com www.jd.com mall.jd.com product.jd.com sales.jd.com Same set of user system 6. Modular development 7. Pluggable 8. Environmental variables 9. Branch git version 10. Componentization 11, […]

  • Webpack NPM error reporting problem set


    Global installation NPM package errorError: EACCES: permission denied, mkdir ‘/Users/lyc/.npm/sentry-cli’ $ sudo npm i -g @sentry/cli /usr/local/bin/sentry-cli -> /usr/local/lib/node_modules/@sentry/cli/bin/sentry-cli > @sentry/[email protected] install /usr/local/lib/node_modules/@sentry/cli > node scripts/install.js Error: EACCES: permission denied, mkdir ‘/Users/lyc/.npm/sentry-cli’ npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @sentry/[email protected] install: `node scripts/install.js` npm ERR! Exit status 1 npm ERR! npm ERR! […]

  • Based on vue-cli 3.0, the blank version of project engineering is rebuilt, which is ready to use


    Written in front When using the Vue framework for development, many people will choose the CLI scaffold provided by Vue official. The latest cli has been updated to 3.0 without configuration. It is convenient to use the project project project built by vuecli only by downloading, but the basic cli can not meet the normal […]

  • Exception in node, exit code and dockerfile


    Recent observationsCIWhen you run, you will occasionally find that although one or two images are built successfully, the container cannot run. The reason is thatexit codeProblem Address: https://shanyue.tech/post/exi throw new ErrorAndPromise.rejectDifference Here are two pieces of code. The first is to throw an exception, and the second is toPromise.reject, two pieces of code will print […]