Forever Node.JS Express 4

前端 未结 5 1616
时光取名叫无心
时光取名叫无心 2020-12-23 23:10

How do you run the Express 4 app with Forever? (or is there a new package?)

I am running my Express 3 apps with Forever installed locally with the package manager. I

5条回答
  •  执笔经年
    2020-12-23 23:34

    http://expressjs.com/guide.html

    in Expressjs guide doc,

    use 'npm start'

    I want use 'forever' but can not too

    so,

    add code at 'app.js'

    var server = app.listen(3000, function() { console.log('Listening on port %d', server.address().port); });

    and

    $node app.js

    can use it.

    and forever can use too

提交回复
热议问题