express Installation

2020-04-21  本文已影响0人  晨曦Bai

官网

http://expressjs.com/en/starter/installing.html

简介

Express is a Node.js web application framework, minimal and flexible, providing a robust set of features for web and mobile applications,
providing a thin layer of fundamental web application features.

安装

precondition :

Install Node.js

  1. create a directory for your application

mkdir appdirec
cd appdirec

  1. create a package.json file

npm init

This command promptes you for a number of things, such as the name and version of you application, simply hit return to accept the defaults for most of them, with the following exception:
entry point: (index.js)
enter app.js , or whatever you want the name of the main file to be. or accept the default index.js by hitting enter

  1. Name the main file name(entry point)

app.js

press enter button in the keyboard

  1. Install Express in the application directory and save it in the dependencies list.

npm install express --save

上一篇 下一篇

猜你喜欢

热点阅读