Auto reloading a Sails.js app on code changes?

后端 未结 8 765
花落未央
花落未央 2020-11-30 18:38

Currently is seems that for any code change in a sails.js app you have to manually stop the sails server and run sails lift again before you can see the changes

8条回答
  •  隐瞒了意图╮
    2020-11-30 18:51

    For example with nodemon to watch api and config directories

    .nodemonignore contents

    views/*
    .tmp/*
    .git/*
    

    Run the command after creating .nodemonignore

    $> nodemon -w api -w config
    

    Example for supervisor to ignore 3 directories

    $> supervisor -i .tmp,.git,views app.js
    

提交回复
热议问题