Created
September 9, 2021 11:32
-
-
Save rishi-raj-jain/4a4372cf95a82321b25a2ae6f9084454 to your computer and use it in GitHub Desktop.
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') | |
const app = express() | |
app.use(express.json()) | |
app.all('/api/some-route/:slug.json', (req, res) => { | |
const slug = req.params.slug | |
// some data fetching calls from the slug | |
res.json({ data: 'data' }) | |
}) | |
module.exports = app |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment