NodeJS (3) 썸네일형 리스트형 NodeJS(1) File System (fs) module In order to read and write files, you need to use fs modules. Let's look at the example right away to see how fs module works. Ex. So in line 1, you first enable readFileSync, writeFileSync by requiring the fs module. Then, I made two text files to use the readFileSync function -> and simply put the path of the file I want to read in the first parameter and the character encoding type in the sec.. NodeJS (1) Module It's always better to keep your codes simple. In order to keep the code clean, it's important to create modules (files) to separate things in parts. Let's see some examples to see what I mean by keeping code clean Ex. To make this code simpler using modules, we can put them in separate files and call elements that are needed Ex. As you can see in the example, I separated my code in three separat.. NodeJS (0) What is NodeJS? NodeJS is simply a Javascript runtime environment where it allows people to use Javascript out of a web browser. Now, it's a popular tool for building server-side applications, web servers, etc. 이전 1 다음