-
Notifications
You must be signed in to change notification settings - Fork 0
Using Node.js and Express
Express is a minimal and flexible Node.js web application infrastructure that provides a robust set of features for web and mobile applications.
Assuming you have already installed Node.js, create a directory to hold the application and convert it to the working directory.
mkdir myapp
cd myapp
Use the npm init command to create a package.json file for the application. For more information on how package.json works
npm init
After executing the previous command you will be asked for the following fields
name: (ejemplo-express) [Enter]
version: (1.0.0) [Enter]
description:This is optional
entry point: (index.js) [Enter]
test command:[Enter]
git repository:[Enter] Or add link from your repository
keywords:[Enter]
author: Camilo Serrano
license: (ISC) [Enter]
Then install Express in the app directory and save it to the dependency list. For example:
npm install express --save
To install Express temporarily and not add it to the list of dependencies, omit the --save option:
npm install express
Okay, you already have the whole structure to work Node.js and Express!