SHARE
TWEET

index.js

a guest May 11th, 2017 308 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const http = require('http');
  2.  
  3. const hostname = '0.0.0.0';
  4. const port = 3000;
  5.  
  6. const cert = `-----BEGIN CERTIFICATE-----
  7. -----END CERTIFICATE-----`;
  8.  
  9. const server = http.createServer((req, res) => {
  10.     res.statusCode = 200;
  11.     res.setHeader('Content-Type', 'application/x-x509-ca-cert');
  12.     res.end(cert);
  13. });
  14.  
  15. server.listen(port, hostname, () => {
  16.     console.log(`Server running at http://${hostname}:${port}/`);
  17. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top