Express Application Methods

Beginner
8 min read
Updated: Nov 2026
23 method guides
Method index

About This Index

This page is the Express Application index for the tutorial track. Each row links to a full guide with syntax, examples, and FAQs.

Learn the Express overview on /express. Use this page when you need an Application API such as app.use(), app.get(), or app.listen().

Beginner path.

Start with app.use() and app.get(), then app.listen()—add app.set() and app.route() when you need views or multi-method paths.

How to Call an Application Method

Create an app with express(), then configure middleware, routes, and listen:

Express
const express = require("express");
const app = express();

app.use(express.json());
app.set("view engine", "ejs");

app.get("/", (req, res) => {
  res.send("Hello Express");
});

app.post("/users", (req, res) => {
  res.status(201).json(req.body);
});

app.route("/items")
  .get((req, res) => res.json([]))
  .post((req, res) => res.sendStatus(201));

app.listen(3000, () => {
  console.log("listening on :3000");
});

Express Application Methods Table

All Application method guides in this Express.js tutorial series (23 tutorials).

Getting Started

2 methods

Wire middleware and start the HTTP server — every Express tutorial begins here.

MethodDescriptionTutorial
app.use()Mount middleware or a sub-app at a path — the foundation of every Express pipeline.Try it
app.listen()Bind the app to a port and start accepting HTTP connections.Try it

HTTP Routing

8 methods

Define routes by method and path — get, post, put, delete, all, METHOD, and route().

MethodDescriptionTutorial
app.get()Register a GET route, or read an application setting when called with one argument.Try it
app.post()Register a POST route handler for form and API submissions.Try it
app.put()Register a PUT route handler for full resource updates.Try it
app.query()Register a QUERY route — search with a request body instead of a long URL.Try it
app.delete()Register a DELETE route handler for removing resources.Try it
app.all()Match a path for every HTTP method — useful for shared middleware on a route.Try it
app.METHOD()Register a route for any HTTP verb Express supports (get, post, put, patch, …).Try it
app.route()Create a chainable route for one path — attach .get(), .post(), and more in one place.Try it

Settings & Views

8 methods

Configure the app — settings flags, template engines, and locals.

MethodDescriptionTutorial
app.set()Assign an application setting such as view engine, views folder, or env.Try it
app.enable()Set a boolean setting to true — shorthand for app.set(name, true).Try it
app.disable()Set a boolean setting to false — shorthand for app.set(name, false).Try it
app.enabled()Return true if a boolean setting is enabled.Try it
app.disabled()Return true if a boolean setting is disabled.Try it
app.engine()Register a template engine callback for a file extension.Try it
app.localsApplication-level local variables available to all templates.Try it
app.render()Render a view to a string callback — useful outside of a request/response cycle.Try it

Params

1 method

Run logic when named route parameters appear in the URL.

MethodDescriptionTutorial
app.param()Register callback middleware that runs when a route parameter is present.Try it

Mounting & Modular Apps

4 methods

Mount sub-apps and routers — path(), mountpath, and Router overview.

MethodDescriptionTutorial
app.path()Return the mount path of this app when used as a sub-app.Try it
app.mountpathThe path pattern where this app is mounted — string or array of patterns.Try it
app.mountpath (deep dive)Detailed guide to mountpath values, multi-path mounts, and vs req.baseUrl.Try it
Router overviewUse express.Router() mini-apps and mount them with app.use() for modular routes.Try it

Frequently Asked Questions

It is the app returned by express()—a request handler that also holds middleware, routes, settings, and view configuration. Almost every Express tutorial starts with const app = express().
Start with app.use() for middleware, then app.get() / app.post() for routes, then app.listen() to start the server. Add app.set() when you need views or other settings.
app.use() mounts middleware (and can match every method). app.get() registers a handler only for GET requests on a path. Use use for shared logic; use get/post/put/delete for method-specific routes.
app.route(path) chains multiple methods for one path. express.Router() creates a modular mini-app you mount with app.use()—prefer routers as the app grows.
Start with app.use() and app.get(), then app.listen(). Open app.set() and app.route() when you add templates or multi-method paths.

Start with app.use()

Open the middleware guide—syntax, examples, and FAQs.

app.use() tutorial →

CODETOFUN NEWS

Stay Ahead in Tech

Get the latest IT news, programming updates, and technology trends directly on your phone.

Your daily dose of tech, straight to your feed.

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

16 people found this page helpful