Skip to content

Instantly share code, notes, and snippets.

@grant
Last active August 27, 2019 17:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grant/0f4ca60e221135fd67883a2c8ff58915 to your computer and use it in GitHub Desktop.
Save grant/0f4ca60e221135fd67883a2c8ff58915 to your computer and use it in GitHub Desktop.
Express Routing: Router
const express = require('express');
// Create an Express object and routes (in order)
const app = express();
app.use('/users/:id', getUser);
app.use('/users/', getAllUsers);
app.use(getDefault);
// Set our GCF handler to our Express app.
exports.users = app;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment