In this lab, you'll need to demonstrate how to access global
and process
variables.
You are a DevOps engineer and you're tasked with deploying a Node.js API server. Developers worked for months on this app and now the team needs your expertise to push the app to production.
The server needs to be "smart" enough to get secret values from whatever OS or environment it is on. In other words, this lab will test you how well you know and can utilize process information. For example, global
has other global objects like process
, while global.process
or just process
has system information.
version.js
which exports the current node version. Export with module.exports = {your code here}
envvar.js
which returns NODE_ENV
environment variable. Export with module.exports = {your code here}
platform.js
which returns the platform name on which you are running it. Export with module.exports = {your code here}
npm test
to verify your 3 solutionsView node-process-lab on Learn.co and start learning to code for free.