Skip to content

Latest commit

 

History

History
59 lines (38 loc) · 1.4 KB

File metadata and controls

59 lines (38 loc) · 1.4 KB

EXPRESS.JS

DESCRIPTION

EXAMPLES OF NODE.JS USING:

  • EXPRESS.JS: A WEB APPLICATION FRAMEWORK FOR NODE.JS.

PREREQUISITES

  • NODEMON: FOLLOW THE INSTRUCTIONS HERE.

REQUIRED PACKAGES

npm install express
npm install -D @types/express # ONLY IF WORKING WITH TYPESCRIPT

EXAMPLE (BASIC EXAMPLE)

npx nodemon ./folderSource/folderTopics/folderExpress/exampleExpress.js

REQUEST AND RESPONSE IMAGE

EXAMPLE (URL PARAMETERS)

npx nodemon ./folderSource/folderTopics/folderExpress/exampleUrlParameters.js

EXAMPLE (POST, PUT, DELETE AND JSON BODY PARSER)

npx nodemon ./folderSource/folderTopics/folderExpress/folderJsonBodyParser/exampleJsonBodyParser.js

EXAMPLE (FORM URLENCODED BODY PARSER)

npx nodemon ./folderSource/folderTopics/folderExpress/exampleFormBodyParser.js

EXAMPLE (MIDDLEWARES)

npx nodemon ./folderSource/folderTopics/folderExpress/exampleMiddlewares.js

EXAMPLE (ROUTERS)

npx nodemon ./folderSource/folderTopics/folderExpress/folderRouter/exampleRouter.js