Go to Node.js website and download Node.js. Choose the option to install Node.js and npm. When the install finished, check the result in command line:
Some notes on CRUD application – Node.js, Express.js & MongoDB
CRUD – READ In Express, we handle a GET request with the get method: app.get(endpoint, callback) endpoint is the requested endpoint. It’s the value that comes after your domain name. Here are some examples: When you visit localhost:3000, you’re actually visiting localhost:3000/. In this case, browsers requested for /. You’re reading this article on https://zellwk.com/blog/crud-express-mongodb/. …
Continue reading “Some notes on CRUD application – Node.js, Express.js & MongoDB”
Building a functional chat app based on Node.js (2)
Web Sockets Web Sockets are a much more responsive technology, since they keep a connection directly open at all times for each client. This allows either the client or server to directly notify each other when changes occur on their side. In contrast to the request / response model, the server does not wait for …
Continue reading “Building a functional chat app based on Node.js (2)”
Building a functional chat app based on Node.js (1)
Introduction We’ll use our new NodeJS knowledge to build a realistic web server that handles the backend of a messaging app for realtime chatting. We will also create a minimal front end so we can see the service working. These skills will be very applicable to those of you who are creating a web app …
Continue reading “Building a functional chat app based on Node.js (1)”
What is call-back function
What is call back function: Simply put: A callback is a function that is to be executed after another function has finished executing — hence the name ‘call back’. More complexly put: In JavaScript, functions are objects. Because of this, functions can take functions as arguments, and can be returned by other functions. Functions that …
What does “let that = this” mean in Javascript/Typescript?
For example, let person = { name:"bill", speak:function(){ console.log("hi i am "+this.name) } } Functions has something called a context. A context is the object the function is being called on. if you were to do person.speak(), it will be called on the object that was defined. The variable person is the context. So when …
Continue reading “What does “let that = this” mean in Javascript/Typescript?”
What is AJAX
What is AJAX AJAX is not a programming language. AJAX is a technique for accessing web servers from a web page. AJAX stands for Asynchronous JavaScript And XML. Here is an example of AJAX: How AJAX works
How to build navigator of video website in Wechat mini program
Here are some bilibili interface: 首页导航:http://mock-api.com/mnEe4VnJ.mock/navList 轮播图:http://mock-api.com/mnEe4VnJ.mock/swiperList 视频列表:http://mock-api.com/mnEe4VnJ.mock/videoList 视频详情:http://mock-api.com/mnEe4VnJ.mock/videoDetail 推荐视频:http://mock-api.com/mnEe4VnJ.mock/otherList 评论列表:http://mock-api.com/mnEe4VnJ.mock/commentList We can use postman to test the first one (navList): And good job this interface works. Then we should use code in index.js: data: { // 首页导航数据 navList:[] }, If the url we use is not allowed, we need to check this from setting …
Continue reading “How to build navigator of video website in Wechat mini program”
The composition of Wechat mini program
This is my very first time touching Wechat mini program, I have created my first demo program on official develop tool program and open it with my editor, let’s have a look at the structure of its files. The structure of my program demo: So far, we can notice that here are four types of …