Skip to content

Instantly share code, notes, and snippets.

@samrith-s
Created February 16, 2020 18:32
Show Gist options
  • Save samrith-s/4039ef79b5a7414914508f4d7e953cd1 to your computer and use it in GitHub Desktop.
Save samrith-s/4039ef79b5a7414914508f4d7e953cd1 to your computer and use it in GitHub Desktop.
Nodehawk usage example

Directory structure:

- package.json
- .nodehawkrc
- src
 - server.js
// server.js
// all of the regular express app command.

app.listen(
   process.env.PORT, 
   () => {
    // log it
  }
);
// .nodehawkrc
{
  paths: [...] // default is "./src"
  port: <whatever-port> // default is 4000,
  exec: "babel-node ./src/server.js" // This runs whenever it detects changes in your file system.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment