Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. var express = require('express')
  2. , http = require('http')
  3. , app = express()
  4. , server = http.createServer(app);
  5.  
  6. app.get('/', function(req, res) {
  7. res.sendfile(__dirname + '/index.html');
  8. });
  9.  
  10. app.listen(8090);
  11. console.log("started...");
  12. app.close();
  13.  
  14. app.close();
  15. ^
  16. TypeError: Object function app(req, res){ app.handle(req, res); } has no method 'close'
  17.  
  18. process.exit(code=0)
  19.  
  20. process.on('SIGTERM', function () {
  21. app.close();
  22. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement