Skip to content

Commit

Permalink
move censos keys to different file, part 2
Browse files Browse the repository at this point in the history
  • Loading branch information
jfoclpf committed May 24, 2024
1 parent 7fa56b5 commit 88f364a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ const errorMiddleware = require(path.join(middlewaresDir, 'error.js'))
// handlebars helpers
const hbsHelpers = require(path.join(utilsDir, 'hbsHelpers.js'))

// mapping between keys and respective description
let keysMapping = JSON.parse(fs.readFileSync(path.join(utilsDir, 'keysMaping.json')))
const censosKeysMaping = JSON.parse(fs.readFileSync(path.join(utilsDir, 'censosKeysMaping.json')))
keysMapping = keysMapping.concat(censosKeysMaping)

const cliOptions = [
{ name: 'port', type: Number, description: `local port to run the sever, default is ${configs.defaultHttpPort}` },
{ name: 'buildFeAssets', type: Boolean, description: 'build front-end assets before server startup' },
Expand Down Expand Up @@ -146,7 +151,7 @@ function startServer (callback) {
res.status(200).sendData({
data: {
bbox: regions.cont.geojson.bbox,
keysMaping: JSON.parse(fs.readFileSync(path.join(__dirname, 'utils', 'keysMaping.json')))
keysMaping: keysMapping
},
template: 'index'
})
Expand Down

0 comments on commit 88f364a

Please sign in to comment.