Last active
August 27, 2019 17:27
-
-
Save grant/0f4ca60e221135fd67883a2c8ff58915 to your computer and use it in GitHub Desktop.
Express Routing: Router
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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