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

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.

主站蜘蛛池模板: 昭通市| 菏泽市| 托克逊县| 鸡东县| 娱乐| 双峰县| 互助| 年辖:市辖区| 思南县| 德庆县| 无极县| 靖西县| 新源县| 洪洞县| 衡水市| 永兴县| 屏东市| 双牌县| 江门市| 江津市| 焉耆| 龙游县| 石河子市| 土默特右旗| 霍邱县| 肥西县| 吴江市| 柳林县| 江城| 邵阳县| 涟水县| 扎兰屯市| 图片| 盈江县| 开封县| 南澳县| 昔阳县| 新绛县| 岐山县| 灵山县| 高碑店市|