[Frontend] Becoming good enough at NodeJs

NodeJs has become more and more popular, also because javascript is so powerful in all aspects now, it is possible to write so many kinds of apps using Js, using NodeJs to create apps for so many different types can be amazing, just because it can be run on so many platforms.
There are several frameworks that a developer has to master in Js so that he can create apps quickly, I'd very much like to first give some practical utilities on different aspects when using Js, the common features are most often networking, OS, file, database, http rest, and server side renderings. So, most often networking is creating a server socket bind on certain port and giving stream to clients visiting the port. This can be very useful. The socket is listening on the port, when a client visits the port, the socket accept the parameter, and then handle it, at last give a stream response to certain port, in http, it is most often in browser.
So, in node Js, express framework is a must know library. In addition, there is another type of framework which handles data interaction. That is, mysql or mongo, these are also very important things.
On http, there is the http module, so in node, we can create a web server by requiring http module.
On file system, the fs module is what we need, so, we can read file synchronously or asynchronously by requiring the module.

What does _ mean in nodeJs?

It represents previous value of expression, so just use a variable to get the value of previous expression. REPL means

What does callback in NodeJs mean?

Callback in NodeJs means for asynchronously doing something or just method.

What does event emitter mean in NodeJs?

In nodeJs, first create an event, event handler, then emitter trigger the event, then call the event handler. This is the right flow. So we just require the events module.

What does buffer mean in NodeJs?

Buffer.from function, buffer is used to store binary data in Js, because most often in Js it is just string data.

What is stream in NodeJs?

Stream in nodeJs is most often file streams, can create read or write streams, or pipe one stream to another to merge or migrate.

What is nodeJs module system?

In nodeJs by requiring a module, it is able to create an object, with the all the module exports as content, in this way, the objects can be used.

What is nodeJs function?

The function concept is the same with that in Js, it is possible to write functions or anonymous function.

What is router in nodeJs?

Most often, it is able to operate http request url by requiring url module.

What are nodeJs global objects?

In nodeJs, there are __filename, __dirname, process, console, setInterval, setTimeout.

What are most often used tools in node Js?

By requiring util module in nodeJs, it is possible to perform inherits, or inspect, isArray, isRegExp,isDate, isError functions.

What about file system in node Js?

In nodeJs, it is possible to operate dirs, files, watch files, read or write to file system or stat file information.

What about get and post requests in nodeJs?

Get request is in url, so, it is able to get all information of a get request by requiring url module. Post request is data received when data event of request is triggered. So, get data in handler of data, and on end handler get the whole of the data.

What are nodeJs tools modules?

OS module, Path module, Net module, DNS module, Domain module. Can use Net module to connect a server and receive data.

What is web module in nodeJS?

Can use http module to send data to server.

What is Express framework in nodeJs?

It is possible to create rest web api using express framework.

var express=require('express')
var app=express()
app.get("/",(req,res)=>{})
var server= app.listen(8000,()=>{console.log(`server is running on port ${ server.address().port }`)})

What is node Js multi child process?

By requiring child process, it is able to write tasks asynchronously. https://www.runoob.com/nodejs/nodejs-process.html

What is packaging with JXCore in nodeJs?

By installing jxcore tool, it is possible to package the project with jx command, and run the project too.

What is mysql operations in nodeJs?

By installing mysql in nodeJs, it is able to connect to mysql using nodeJs and run commands.

What is mongoldb connection in nodeJs?

It is possible to do operations by installing mongoldb module package in node Js.

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi阅读 7,451评论 0 10
  • The Inner Game of Tennis W Timothy Gallwey Jonathan Cape ...
    网事_79a3阅读 12,297评论 3 20
  • 张启立回到家后,发现现在时间是深夜凌晨三点了。 今天晚上发生的一切,简直打破了他的世界观,他觉得,就算是他...
    蛰伏_73af阅读 327评论 0 0
  • 今天是冬至,也是儿子的第一次期中考试。早晨给儿子炒的最爱吃的蛋炒饭,吃完饭送去上学,想着能早点去,可忙忙叨叨的...
    史晓辉阅读 174评论 0 3
  • 周末的下午。自己一个人在园子里晃荡。美其名曰,我要每周完成两万步,其实,我是想带着爱你的我逛遍没有你的北京城……为...
    渴望枕头的宝贝阅读 181评论 1 0