Skip to content

Instantly share code, notes, and snippets.

@joelanman
Last active November 2, 2020 10:34
Show Gist options
  • Save joelanman/cd4e74817c21b6e456850bd204ef0588 to your computer and use it in GitHub Desktop.
Save joelanman/cd4e74817c21b6e456850bd204ef0588 to your computer and use it in GitHub Desktop.
const express = require('express')
const router = express.Router()
// Add your routes here - above the module.exports line
router.get('/example', function(request, response){
var addresses = []
for (var i = 2; i<60; i+=2){
addresses.push({
value: `${i} Kenmore West, Steedwick, Northumberland, NE65 2GF`,
text: `${i} Kenmore West, Steedwick, Northumberland, NE65 2GF`
})
}
response.locals.addresses = addresses
response.render('example')
})
module.exports = router
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment