官术网_书友最值得收藏!

Creating a Node.js application

To start off a sample Node.js project, simply create a project folder first and then run the following command from that folder:

npm init

On running this command, Node will prompt you with a series of questions, which you can either fill or leave blank:

Once the blank application is created, all you see is a file called package.jsonYou can now add the dependencies that are needed to create the Node.js application:

npm install body-parser express --save

The body-parser module helps with parsing of the POST request body, whereas the express module helps with the creation of the Node.js server.

主站蜘蛛池模板: 高清| 龙井市| 突泉县| 龙门县| 福鼎市| 岱山县| 廊坊市| 买车| 黑水县| 新丰县| 德化县| 娱乐| 云浮市| 东丽区| 大竹县| 台湾省| 繁昌县| 莫力| 清远市| 海淀区| 开江县| 大港区| 辽宁省| 曲阜市| 贵南县| 韶关市| 重庆市| 阿尔山市| 商水县| 绍兴县| 安仁县| 托克逊县| 武安市| 晋江市| 东方市| 临汾市| 宝丰县| 鄢陵县| 嫩江县| 台前县| 额尔古纳市|