Get restify REST API server to support both HTTPS and HTTP
问题 I am using node.js restify ver4.0.3 The simple following code works as a simple REST API server that supports HTTP. An example API call is http://127.0.0.1:9898/echo/message var restify = require('restify'); var server = restify.createServer({ name: 'myapp', version: '1.0.0' }); server.use(restify.acceptParser(server.acceptable)); server.use(restify.queryParser()); server.use(restify.bodyParser()); //http://127.0.0.1:9898/echo/sdasd server.get('/echo/:name', function (req, res, next) { res