This repository contains several examples using Express.
- auth - Authentication with login and password
- content-negotiation - HTTP content negotiation
- cookie-sessions - Working with cookie-based sessions
- cookies - Working with cookies
- downloads - Transferring files to client
- ejs - Working with Embedded JavaScript templating (ejs)
- error-pages - Creating error pages
- error - Working with error middleware
- hello-world - Simple request handler
- markdown - Markdown as template engine
- multi-router - Working with multiple Express routers
- multipart - Accepting multipart-encoded forms
- mvc - MVC-style controllers
- online - Tracking online user activity with
online
andredis
packages - params - Working with route parameters
- resource - Multiple HTTP operations on the same resource
- route-map - Organizing routes using a map
- route-middleware - Working with route middleware
- route-separation - Organizing routes per each resource
- search - Search API
- session - User sessions
- static-files - Serving static files
- vhost - Working with virtual hosts
- view-constructor - Rendering views dynamically
- view-locals - Saving data in request object between middleware calls
- web-service - Simple API service
You can clone this repository using:
$ git clone https://github.com/expressjs/examples
$ cd examples
NVM is supported, so you can do:
$ nvm install
Installation is done using the
npm install
command:
$ npm install
Whichever example you want:
$ node examples/content-negotiation
The Express.js project welcomes all constructive contributions. Contributions take many forms, from code for bug fixes and enhancements, to additions and fixes to documentation, additional tests, triaging incoming pull requests and issues, and more!
See the Contributing Guide for more technical details on contributing.
See the Code of Conduct for a description of the standards we adhere to.
If you discover a security vulnerability in Express, please see Security Policies and Procedures.
To run the test suite, first install the dependencies, then run npm test
:
$ npm install
$ npm test
The original author of Express is TJ Holowaychuk
The current lead maintainer is Douglas Christopher Wilson