apiVersion: v1
data:
  index.js: |+
    const http = require('http');

    const port = process.env.PORT || 3000;

    const app = http.createServer((req, res) => {
      res.writeHead(200, {'Content-Type': 'text/plain'});
      res.end(JSON.stringify(req.headers));
    });

    app.listen(port, () => {
      console.log(`Server is listening on port ${port}`)
    });

kind: ConfigMap
metadata:
  name: node-script
