- Learning Node.js Development
- Andrew Mead
- 291字
- 2021-06-30 18:56:45
Initialization of an application
The first step we'll take inside of the Terminal is that we'll make a directory to store all of these files. We'll navigate from our home directory to the desktop using the cd Desktop command:
cd Desktop
Then, we'll make a folder to store all of the lesson files for this project.
Now, we'll make that folder using the mkdir command, which is the short form for make directory. Let's call the folder notes-node, as shown in the following code:
mkdir notes-node
We'll make a note app in Node so that notes-node seems appropriate. Then we'll cd into notes-node, and we can get started playing around with some of the built-in modules:
cd notes-node
These modules are built in, so there's no need to install anything in Terminal. We can simply require them right inside of our Node files.
The next step in the process is to open up that directory inside the Atom text editor. So open up the directory we just created on the Desktop, and you will find it there, as shown in the following screenshot:

Now, we will need to make a file, and we'll put that file in the root of the project:

We'll call this file app.js, and this is where our application will start:

We will be writing other files that get used throughout the app, but this is the only file we'll ever be running from Terminal. This is the initialization file for our application.
- HTML5 Game development with ImpactJS
- Building RESTful Web Services with Spring 5(Second Edition)
- SSL VPN : Understanding, evaluating and planning secure, web/based remote access
- 雷達饋線技術(shù)
- 物聯(lián)網(wǎng)技術(shù)與應用
- 城市治理一網(wǎng)統(tǒng)管
- 網(wǎng)絡安全應急響應技術(shù)實戰(zhàn)
- Microservice Patterns and Best Practices
- 4G小基站系統(tǒng)原理、組網(wǎng)及應用
- 大型企業(yè)微服務架構(gòu)實踐與運營
- 異構(gòu)蜂窩網(wǎng)絡關(guān)鍵理論與技術(shù)
- 中國互聯(lián)網(wǎng)發(fā)展報告2021
- Guide to NoSQL with Azure Cosmos DB
- 現(xiàn)場綜合化網(wǎng)絡運營與維護:運營商數(shù)字化轉(zhuǎn)型技術(shù)與實踐
- 計算機通信網(wǎng)絡安全