Last active
November 2, 2020 10:34
-
-
Save joelanman/cd4e74817c21b6e456850bd204ef0588 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 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