Skip to content

Instantly share code, notes, and snippets.

@artcommacode
Last active August 10, 2016 10:05
Show Gist options
  • Save artcommacode/70d787b5482b6f3bbbcc1becdb43d3c0 to your computer and use it in GitHub Desktop.
Save artcommacode/70d787b5482b6f3bbbcc1becdb43d3c0 to your computer and use it in GitHub Desktop.
// @flow
import express from 'express'
import myRoute from './myroute'
const app = express()
app.use('/my-route', myRoute())
// @flow
import express from 'express'
const router = express.Router()
export default () => {
router.get('/', (req, res, next) => {
// respond to GET on /my-route
})
return router
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment