Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const http = require('http');
- const hostname = '0.0.0.0';
- const port = 3000;
- const cert = `-----BEGIN CERTIFICATE-----
- -----END CERTIFICATE-----`;
- const server = http.createServer((req, res) => {
- res.statusCode = 200;
- res.setHeader('Content-Type', 'application/x-x509-ca-cert');
- res.end(cert);
- });
- server.listen(port, hostname, () => {
- console.log(`Server running at http://${hostname}:${port}/`);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement