server.js 393 B

1234567891011121314151617
  1. var http = require("http");
  2. function start(app) {
  3. var httpServer = http.createServer(app);
  4. process.on('uncaughtException', function(e) {
  5.   console.log(e);
  6. });
  7. var server = app.listen(8888, function () {
  8. var host = server.address().address
  9. var port = server.address().port
  10. console.log("应用实例,访问地址为 https://%s:%s", host, port)
  11. })
  12. }
  13. exports.start = start;