koa2 implements jwt login

1.jwt Introduction Introduction is partly reproduced from Ruan Yifeng's Introduction to JSON Web Token Tutorial 0.session login 1. Users send user names and passwords to the server. 2. After the server is authenticated, save relevant data in the current session, such as user role, login time and so on. 3. The server returns a session_id to the ...

Posted by mattcooper on Tue, 05 May 2020 19:51:50 +0200

Step by step to complete Kubernetes binary deployment -- etcd cluster building (single node)

Completing Kubernetes binary deployment step by step (I) -- etcd cluster building (single node) Preface The basic theory and core components of Kubernetes are briefly introduced. The first step of deploying Kubernetes cluster with single node and binary system is to build etcd cluster experiment flow. List of cluster planning (the next article ...

Posted by RestlessThoughts on Tue, 05 May 2020 17:14:40 +0200

java websocket message push

1. maven introduces dependency <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> <version>1.2.3</version> </dependency> <dependency> <groupId>javax.websocket</groupId> <artifactId>javax.websocket-api</art ...

Posted by studio805 on Tue, 05 May 2020 15:34:33 +0200

ES[7.6.x] dynamic mapping of learning notes

In general, we use es to build an index by creating an index, defining the fields in the index and the mapped types, and then importing data into the index. Dynamic mapping is a very important concept in ES. You can directly import a piece of data into the document. At the same time, index, field and field type will be created automatically wit ...

Posted by madan koshti on Tue, 05 May 2020 05:24:33 +0200

redux source code interpretation (2)

(1) A simple version of redux is written in. The tests are all directly based on the command line output. Obviously, this is unscientific So you need to write tests, so. I chose jest. The introduction on the Internet is as follows . Configure simple test environment according to official documents npm install --save-dev jest Add th ...

Posted by holowugz on Sun, 03 May 2020 19:17:48 +0200

App learning note 1-tabBar and carousel

Today, I started to learn small programs. I started to write apps in my own order. I didn't follow official wechat documents. Some of the controls are a combination of official and online code shared by other students. Basic overview In this part, look at the official website to find out about the composition of the architecture page of the app ...

Posted by samip1983 on Sun, 03 May 2020 15:31:30 +0200

Baidu Encyclopedia crawler

WebMagic configuration: http://www.cnblogs.com/justcooooode/p/7913365.html Crawling target Recently, we need to analyze some domain concepts, choose to use Baidu Encyclopedia to crawl corresponding terms, and get information and knowledge from them. I divide the query results into two categories, one is included in the encyclopedia, the othe ...

Posted by kryles on Sat, 02 May 2020 22:45:32 +0200

Develop | wechat applet audio player + API | wx.createaudiocontext

introduction: Audio is an audio component of wechat applet, which can easily play / stop audio and other customized actions in the applet.Attached is the description of the properties of the audio component of the wechat applet: https://mp.weixin.qq.com/debug/wxadoc/dev/component/audio.html This time, through the post, name, author, src, id, ...

Posted by EviL_CodE on Thu, 30 Apr 2020 21:34:09 +0200

Shell Script: find all files in a directory after a certain time

Problem description Often swim in the ocean of Linux files, often need to find all the files after a certain time. Maybe you're packing them, or maybe you're just checking. The question is, what do you do if you want to write a script find-newer and put it on the server? target With a command like this, you can fi ...

Posted by bizshop on Thu, 30 Apr 2020 09:40:04 +0200

Picture labeling component - jquery.picsign - the first open source component encapsulated by itself

After a few days of trying and learning, I have encapsulated my first js component, there are many shortcomings, please give me some advice. Because of some business needs, we need to add some labels to the pictures, find some on-line but can not meet the needs, and there are some bug s, too many pits So I have the idea of encapsulating one by ...

Posted by JohnMC on Wed, 29 Apr 2020 19:44:09 +0200